Select to view content in your preferred language

Popup Zoom To

1539
13
01-31-2012 04:56 AM
NateRose
Deactivated User
I'd like to have the "zoom to" button on a point layer zoom to the extent of a layer of the line layer.  For example I have a road construction layer which is a line layer, at the full extent I have points symbolizing them (two operational layers).  I'd like to click the zoom to button on the point layer and have it zoom to the extent of that line layer. 

Any ideas would be great. 

Nate
Tags (2)
0 Kudos
13 Replies
NateRose
Deactivated User
I got all the code updated.  It still doesn't zoom to the extent of the unique route number records but on records that have the same route number it zooms to the centroid of the two records.  Say if you have Hwy 1 and two segments that are 1/2 mile apart, it will zoom so you can see both.  The records that have one instance it zooms the same as original.

If you wish to look into this further its up to you.

Thanks,

Nate
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nate,

   So if your points are the ones with the popup and you want to zoom to the lines then why are you querying the points again?

var featLay:FeatureLayer = new FeatureLayer("http://maps.co.stearns.mn.us/ArcGIS/rest/services/Construction/MapServer/0");
The lines are 1 and points are 0.
0 Kudos
NateRose
Deactivated User
Robert,

Small oversight on my part.  Thanks for your assistance.  This will be very handy for multiple applications.

Nate
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nate,

   Glad you got it working. Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos