Skip to Content

How do I set the initial zoom on the basemap in geomap in DS 1.6 SP2?

I have created a report with a GeoMap component but am confused as to how to set the default zoom.

I am using this basemap url:

http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{LOD}/{Y}/{X}

When I run the report initially it looks like this.

I can zoom in manually to here.

How do I set the zoom to be similar to this on opening?

Looked through the 38 hits on my search but found nothing. Tried to find a US basemap without success.

Thanks in advance.

Jeff

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 07, 2017 at 08:23 PM

    Hi Jeff,

    You have to do this with script, you can add the code below to the onStartup event of the application.

    GEO_MAP_1.centerMap(layerId);

    Replace the layerId with the name of the layer in your application which should have the focus on.

    Thanks.

    Deepu

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 08, 2017 at 04:13 AM

    Hi Jeff,

    Regarding your requirement for a "US basemap", if you are referring to a shape file for the US, you can download both State and County level GeoJSON files from my blog post: Design Studio Innovation Series – Topic 7: Geo Maps Part II – Zoom, Zoom, Zoom!

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded