Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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

share|improve this answer
    
Thanks David, that's useful. –  JcFx Mar 14 '13 at 10:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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