[GIS] iframe map adjusts to cartodb zoom/centering

cartoembeddable-web-maps

I noticed recently that my published iframe map adjusts to whatever the zoom and centering is for that map on the cartodb site. So if I'm playing around with the cartodb map on cartodb, say exploring particular regions of the map, this will have a direct impact on what my website users see in the embedded map.

Is there a way to avoid this? I don't see any parameters for setting center or zoom in the iframe code:

<iframe width='100%' height='520' frameborder='0' src='http://sanjuro.cartodb.com/viz/10f021cc-b7a5-11e4-a4dd-0e853d047bba/embed_map' allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>

Best Answer

You can specify some flags in the URL to get the view you want.

The example below centers on [lat,long] = [34,-122] with zoom equal to 5.

http://team.cartodb.com/u/santiagoa/viz/4a39c7f8-b6ce-11e4-9da5-0e853d047bba/embed_map?center=[34,-122]&zoom=5

Related Question