Select to view content in your preferred language

Tax Parcel Viewer set map extent

3211
3
Jump to solution
07-28-2015 12:18 PM
Labels (1)
PLadd
by
Frequent Contributor

How does the extent work on the Tax Parcel Viewer with js api?  I'm just downloaded and am configuring the it  from here .  I can't seem to get the map extent to show my entire community.

On the config.js page I am setting DefaultExtent as follows (line101):

// Initial map extent. Use comma (,) to separate values and don't delete the last comma
    DefaultExtent: " 955000,740000,1010000,776000",

It zooms to our community but no matter how large I make the extent, the map extent appears to remain fixed.  I've searched and stepped through the code but can't figure out what's controlling this.  I know the values are passing properly when I look here on homePage.js (line 256):

mapExtent = new esri.geometry.Extent(parseFloat(mapExtent[0]), parseFloat(mapExtent[1]), parseFloat(mapExtent[2]), parseFloat(mapExtent[3]), map.spatialReference);
        map.setExtent(mapExtent);

Anybody have some guidance for me?

0 Kudos
1 Solution

Accepted Solutions
PLadd
by
Frequent Contributor

Yes, that was my problem - the scale settings on the cached map service.  Once I set it to 1:48,000 I was able to see the entire city.

View solution in original post

0 Kudos
3 Replies
StevenGraf1
Frequent Contributor

I wonder if your browser has the extent cached.  It will remain that way until you clear it.  Each browser is a little different on how to clear it. 

Refreshyourcache.com - The Guide to Clear your Browser Cache!

This is where I generate my extents:

JS Extent Helper

Hope this helps

-Steven

0 Kudos
PLadd
by
Frequent Contributor

Thanks for the reply.  I cleared out the cache to no avail (tried it on IE and Chrome).

If I change the coordinates the map center will move but the initial extent is always at the same scale and not at the extent I would expect to see (the whole city).

I also noticed that the maximum zoom extent seems to be 12,000.  This is according to line 515 of js/homePage.js

        mapScale = map.getLayer(baseMapLayers[0].Key).tileInfo.lods[map.getLevel()].scale;

I'm beginning to wonder if it has something to do with my map service.  Anyone care to look?

http://gis1.meridenct.gov/arcgis/rest/services/ParcelsVW_cache/MapServer

My largest scale just happens to be 12,000 so I'm thinking this has something to do with it. . . . .

0 Kudos
PLadd
by
Frequent Contributor

Yes, that was my problem - the scale settings on the cached map service.  Once I set it to 1:48,000 I was able to see the entire city.

0 Kudos