Blu
Blu

Reputation: 4056

some portion of Map disappears

I am using Google map API Version 3 with jQuery mobile. I created marker on map then also 1 marker for current position and then I want to print path between two points like current point and some specific spots. For doing this I generated popup with list of fixed spots user can select any and processed after popup application back to map and tries to plot a route on map but in Chrome the map view is destroyed and shown just in corner. Only in Firefox no issue arise.

Upvotes: 0

Views: 56

Answers (1)

Madcoe
Madcoe

Reputation: 213

This usually happens when you load your map inside a hidden element or you change your elements properties after loading a map inside it. If that is the case

google.maps.event.addListenerOnce(map, 'idle', function() {
   google.maps.event.trigger(map, 'resize');
});

this might solve your problem.

Upvotes: 1

Related Questions