1

I'm programming my first ArcGIS application. I've created a simple map. When I zoom out to a world view, the map doesn't fill the width of the screen. Ideally I'd like it to repeat until the available space is filled. How can I do this?

Here's the code I have so far:

var map = new esri.Map("map", {

basemap: "topo",
center: [0, 0],
zoom: 2
});

And here's the result:

enter image description here

How can I get the map to repeat to fill the white space on either side?

(Crossposted: http://forums.arcgis.com/threads/79757-How-can-I-get-the-map-to-repeat-to-fill-the-screen)

Update:

I've set the spatial reference to (I think) Web Mercator, and wrapAround180 to true, but this has no effect. New constructor:

var map = new esri.Map("map", {
            basemap: "topo",
            center: [0, 0],
            zoom: 2,
            sliderPosition: "bottom-left",
            spatialRefence: new esri.SpatialReference({ "wkid": 3857 }),
            wrapAround180: true
        });

What am I doing wrong?

1 Answer 1

4

Wrap around 180 means that it will continue to pan as you move along the longitude. See fiddle for an example (it is true by default). I've never seen ESRI do the repeat map thing, I don't believe it is possible. If you want that feel you could limit the zoom levels so they can't go out beyond a certain zoom level using LOD's in the map configuration

0

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.