Select to view content in your preferred language

Zoom out after Geocoder finds match

3080
2
Jump to solution
07-08-2015 11:38 AM
TimWitt2
MVP Alum

Hey everybody,

In my javascript application I use the ESRI Geocoder and once a match has been selected it zooms to the match.

What I try to do is after my map zooms to the match I want to zoom out to a specific extent, which should be possible by using map.setExtent().

This only works if I am in developer mode and I put a break point at map.setExtent() , which leaves me to believe that the zooming initiated by the geocoder takes some time and happens after I do map.setExtent()

Since Jive hates me posting code, I have put the relevant code in this fiddle: Edit fiddle - JSFiddle

Thanks for any help!

Tim

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tim,

   Have you looked at setting the Geocoders autoNavigate property to false seems how you are not wanting the extent that the Geocoder takes you to?

Geocoder | API Reference | ArcGIS API for JavaScript | autoNavigate

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

   Have you looked at setting the Geocoders autoNavigate property to false seems how you are not wanting the extent that the Geocoder takes you to?

Geocoder | API Reference | ArcGIS API for JavaScript | autoNavigate

TimWitt2
MVP Alum

Thanks Robert, that's exactly what I needed.

0 Kudos