0

I recently did a javascript application that has since stopped working, well partially. The users enters an address, then they are presented various voting related information State Rep, State Senator, voting precinct, school dist etc. When the user clicks 'show district', the respective district (State Rep, School Dist etc) polygon should highlight, and indeed it did when deployed.

Just recently I was notified it did not work anymore. It seems to be a problem with the basemap being in one spatial reference and my reference layers being in another. I can possibly get my ref layers changed, but this will require an act of congress. I was trying to reproject my reference polygons via GeometryService to project onto my basemap, but got nowhere. My geometries did not return in the callback.

Current Prod: http://argis.ualr.edu/districtfinder/

Address (copy/paste): 1 Capitol Mall, Little Rock, Arkansas, 72201

2
  • Your geometries seem very large/complex as the GET response goes on for days. Can you log into the server and see if there's any error messages? It might give a clue as to why the geometries didn't return from the callback.
    – Mintx
    Jun 4, 2015 at 21:59
  • @Mintx No I don't see any errors in the log concerning this service. Just to be clear, the code that I was trying to use to project the polygons is not here, I made a fiddle showing the code I added to try and do this jsfiddle.net/joffreyj/0khzLvku. Going through the debugger, I can see the geometries going into the gsvc.project but when it comes back from the transformation there is not poly data. Jun 5, 2015 at 12:44

1 Answer 1

1

because ArcGIS Server operations are able to reproject output features on the fly, there should never be a need to do it manually afterward.

it looks like prior to 3.12, in situations like this, the ArcGIS API for JavaScript was incorrectly identifying the spatial reference of output geometries from identify as WGS84 {wkid:4326} instead of web mercator {wkid:3857/102100}.

to put it another way, you are already getting features back with geometry in the coordinate system of your map, they are just being incorrectly tagged before they make it to the callback.

in order to get the polygons to start drawing, the easiest thing to do would be to just upgrade your app to 3.13. (you can see a working demonstration here). if you revert that app to 3.11 you'll start to see the same inappropriate behavior that is also evident in your production code.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.