Can I link to a feature/pop-up in an embedded ArcGIS Online map from my website?

2508
5
12-20-2011 11:47 AM
ClarkLarson
New Contributor II
I've scoured the Forums on this topic and I can't seem to find an answer so I'm trying a new post.

I would like to create hyperlinks from a website to individual feature/pop-up locations within a Web Map such that I can click on a link and have a map (ideally embedded in the same webpage) center and zoom to the feature that relates to the record I linked from.

With my limited knowledge of web/Java/etc. programming, the only way I've found to do this so far is to create a series of URLs of the public Web Map appended with each feature's centroid coordinates and zoom level at the end of the map's URL and then have the webpage link to these URLs below each record.  This doesn't seem like an elegant solution so I was wondering if there is a more streamlined way to do this?  Can an Online Web Map open to a specific location and zoom level based on the extent of a unique layer feature?
Tags (2)
0 Kudos
5 Replies
MikeMinami
Esri Notable Contributor
There is no way from the URL to set the extent of the web map to a particular layer. You can only use the properties you seem to have found already.

Now, you could write your own application that utilizes the JavaScript API to do what you want to do.

Thanks,

Mike
0 Kudos
ClarkLarson
New Contributor II
Mike,

Thanks for the rapid response!  I'm glad to know I just wasn't seeing it in the Help topics.  I'll look into the Javascript path.

Cheers,

Clark
0 Kudos
MarkCastenson1
New Contributor II
Clark,
Could you give me your url(s) to look at so I can try it here?  I have an application where this would be beneficial to me.


Thanks!
Mark
0 Kudos
ClarkLarson
New Contributor II
Mark,

Sure.  I never did end up writing a JavaScript for it, but figured out a work-around that you can inspect.  The starting page at www.rockvillemd.gov/index.aspx?NID=621 shows the embedded map of active development projects in the City of Rockville with pop-ups to the layer's attributes and a details webpage.  What I had to figure out was how to link from "View Project Location" on a page like www.rockvillemd.gov/index.aspx?NID=694 that would take me to a map location where the project was located.  I ended up appending x- and y-coordinates in Decimal Degrees as well as a zoom level that would open an ArcGIS online map to the spot I wanted to the ArcGIS Online map URL, like www.arcgis.com/home/webmap/viewer.html?webmap=24dbf8f910eb417fb1f649af128cae1c&center=-77.1848724826....  It requires some field calculations each time I create a new feature, but now that I've got it down, it goes fairly quick.  Not being a hacker, this was the fastest and easiest way for me to get this done.

I'm attaching a write-up of the procedures I followed that I sent to someone else last year that should help.  Let me know if you need further explanation.
MarkCastenson1
New Contributor II
Clark,

Perfect.  That is exactly what I needed.  Thanks for the help!


Mark
0 Kudos