Hello everyone,
I'm currently having issues getting my script to work with data hosted on my companies server. The code is copy/pasted from the following link, and the goal is to perform the exact same function but with our data. So far I keep getting an "unexpected token" error for one of the colons on line 71.
Below is my script, it's completely unmodified other than the names of the data, but I could have mistyped anywhere, if you catch something, please let me know. I've attached an HTML file of the script I've adapted.
Thanks!
Solved! Go to Solution.
In addition, I believe that support is working on a series of blogs that help developers troubleshoot their scripts:
JavaScript Debugging Tips – Google Chrome Network Tab | Support Services Blog
Perfect, I'll be sure to give that a look-through!
Thanks, I have that bookmarked for whenever I have time!
Sorry guys, haven't had time to check out those tutorials/ webinars and we're hoping to get htis script done today. Just have one last problem, I got every thing else working. When you type the OBJECTID into the url (?OBJECTID=) it will bring you to the map but will not link to the selected polygon. I think the problem is in lines 147-168 (where the parcel is selected from the url).
Pretty sure the error is with the original code too, rather than my changes. Just like how I had to delete "mode: FeatureLayer.MODE_SELECTION" after my changes. Anyway, thanks for all the help fellas.
Nope, It's already doing that from the popup. The goal is that when an OBJECTID number is added to the url (in the format specified in line 101) the maps selects and zooms tot he corresponding feature, like in the example.That way, we could send a client a link to the map, and it would automatically select and zoom to whatever feature they are interested in.
We're looking to do more with this script down the road, but I'll have time to check out more tutorials before than. My schooling in Javascript was unfortunately quite minimal.
Ryan,
I wish I could help you, but I don't see the error. It might be good to start a new thread, since it got a little busy here
Tim
Okay thanks again, Tim!