Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author google-maps-plugin

    (@google-maps-plugin)

    Hello.
    This is because html wrapper for your widget area- is hidden when map is rendered, so google just can’t render all map – as it will show only visible parts. You need to go into code and call re-init of your map after this block was showing. Code, that you should try, is:
    google.maps.event.trigger(gmapPreview.maps[1].mapObject, ‘resize’);
    for map ID – 1.

    Thread Starter osflake

    (@osflake)

    ok but where I have to put it?
    I dont have a widget, this is only div area

    Plugin Author google-maps-plugin

    (@google-maps-plugin)

    You should call this in your javascript, right after you will show this div (after click on button).

    Thread Starter osflake

    (@osflake)

    OK it’s working resize – THANK YOU, but position of point on map is not center ;(

    Ok, try to do this after re-init map:
    gmapPreview.maps[1].mapObject.setCenter( marker.getPosition(

    new google.maps.LatLng(
    gmapPreview.maps[1].mapParams.params.map_center.coord_y, gmapPreview.maps[1].mapParams.params.map_center.coord_x)

    ) );

    Thread Starter osflake

    (@osflake)

    Hi,

    I put it, but sth is wrong ;(

    Plugin Author google-maps-plugin

    (@google-maps-plugin)

    Hello.
    I think I made mistake in code, try this:
    gmapPreview.maps[1].mapObject.setCenter(
    new google.maps.LatLng(gmapPreview.maps[1].mapParams.params.map_center.coord_y, gmapPreview.maps[1].mapParams.params.map_center.coord_x)
    );

    Thread Starter osflake

    (@osflake)

    GREAT!!

    It’s working.. You are good Man

    thank You

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Maps don't show all of view’ is closed to new replies.