1

I'm working on Google map api V3. When i load all the pins and set the fitbounds my map is loading two worlds. It is fine to have two worlds, but both maps have pins on it. it is really confusing to have more than one world with pins.

I've already refered here. But it is not useful as i can't set the zoom level as it hides the pins on zoom level 1 and shows two worlds with zoom level 0.

Is there any way to have pins on only one world (I don't mind about have two world's displayed).

Note: I don't have control over the width and height of the div which is loading the map.

1 Answer 1

0

I didn't find any specific way of implementing this using google map api. But i did a manual calculation to bring one map. But that is also not a fully flexible solution because it is not displaying the entire world.

Based on the idea, that the tile size is 256 * 256, I tried the following. By using this i'm not letting the user to go below the specific zoom level. It meets my requirement partially as the minZoom level is placed according to the width of the device.

var minZoomLevel = Math.floor(parseInt($(window).width())/256);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.