Select to view content in your preferred language

centerandzoom & onClick event mappoint spatialreference null

1858
11
09-17-2010 08:07 AM
GlenRhea
Emerging Contributor
I have a "zoom to county" drop down that uses centerandzoom which works great however all my onclick events fail when I use the zoom because mappoint spatialreference is null until I pan the map. Once I pan the map all my onclick events work fine.

This issue also affects another function that uses centerandzoom but displays a layer instead. The layer doesn't show up until I pan a little.

There is too much code to post so here is a link to the app:
http://dev.geostor.arkansas.gov/G6/Viewer.html

All my code is in http://dev.geostor.arkansas.gov/G6/js/Viewer.js and the two functions I'm referring to are zoomCounty() and xyZoom()

Thanks for your time,
Glen
0 Kudos
11 Replies
GlenRhea
Emerging Contributor
Ahhh I see what you're saying now. Because I didn't define the spatial reference on the point when I used centerandzoom the spatial reference was null until I panned some.

Sigh. I'm usually pretty good about RTFM'ing too 😞

Thanks again for all your time.

Glen
0 Kudos
derekswingley1
Deactivated User
No problem, my pleasure to help.
0 Kudos