Zooming out limits width to 360, leaving blank spaces on left and right

710
4
Jump to solution
11-14-2014 03:43 PM
DavidElies
New Contributor III

Is is possible to have the map zoom out but still fill it's container from left to right if the container is much wider than it is tall?  Many of us have widescreen monitors these days, and I either have to limit the minimum zoom level of the map, which seems to only limit the latitude and leaves too much off the north and south or have white bars to the east and west.

What I'd like is for the map to show more than just 360 degrees longitude if I zoom out far enough to show most of the 180 degrees of latitude.  Is this possible?  Or can I limit the longitude to 360 and show a corresponding latitude for my map size?

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Yes, it does work differently in Javascript (and Flex) than in Silverlight. I was surprised to hear this, but it was mentioned in this earlier discussion.

View solution in original post

0 Kudos
4 Replies
DavidElies
New Contributor III

I noticed that the API seems to treat extents as a loose suggestion more than a strict request. I want to show a map that extends from -180 to 180 longitude  and floats the y values and just uses the corresponding latitudes for the size of my map div. I tried setting an extent like (-180,-45,180,45), but it still zooms out enough to show the entire -90 to 90 degrees of latitude and leaves blank spaces on the left and right of the map.  Is it possible to do this?

0 Kudos
KenBuja
MVP Esteemed Contributor

Take a look at this post that talks about the inability to show a "repeating" map with the Javascript API.

Your other issue about the extents not precisely set to your definition has to do with tiled services. These services can only be set to specific map scales, which means the extent will be dependent on the size of the map in your browser window. It will be set to the closest extent to the one you've specified.

0 Kudos
DavidElies
New Contributor III

Thanks for your response Ken Buja‌,

Okay, so "multiple worlds" doesn't work...I'm sure it's with good reason.  Does the tile thing work different with the silverlight API?  It seems that we can zoom to arbitrary extents with our silverlight application, but we're limited to specific LODs in the javascript API.  Do you know if this is the case?

0 Kudos
KenBuja
MVP Esteemed Contributor

Yes, it does work differently in Javascript (and Flex) than in Silverlight. I was surprised to hear this, but it was mentioned in this earlier discussion.

0 Kudos