what order do you add a layer, geocoder widget, and information pop-up widget?

1333
15
Jump to solution
08-13-2013 02:20 PM
MichaelMachado
New Contributor III
I'm still learning javascript and have gone through some tutorials and read a lot.  I've been able to get a simple map and a simple geocoder but cannot seem to get them to work together.  I'm not sure what order they go or if they should all be in one.  I used a Geocoder Service from ArcGIS Server and a simple parcel layer from a MapServer service.  Any help would be much appreciated.
0 Kudos
15 Replies
MichaelMachado
New Contributor III
Hi John,

I removed the "/0" after MapServer but the layer still does not show up.
0 Kudos
JohnGravois
Frequent Contributor
please compare and contrast my working sample linked above with your own app to try and determine the cause of the problem. 

if you can't find it i'd be happy to take a look at your own code if you provide it.
0 Kudos
MichaelMachado
New Contributor III
Good morning John, well some progress is being made.  The topo map shows up with the city limit line, which is layer "0".  The parcel layer is "1".  Do I need to identify the parcel layer in some way so it will show up too?  Thanks
0 Kudos
JohnGravois
Frequent Contributor
passing specific layerIds to imageParameters is a technique to restrict the layers from the original service that are drawn in your appl;ication.  you can either skip supplying the imageParameters in your ArcGISDynamicMapService layer constructor if you'd like all the layers in the service to display, or add all the individual layerIds you want to the array and continue to include it in the constructor.

//imageParameters.layerIds = [0,1,2];

layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer");
0 Kudos
MichaelMachado
New Contributor III
Yeah, it worked and looks great.  I had to tweak the lat/long to get it to center a bit better for our city.  There are a few more things I need to add to this and would like your help if possible.  Can I do that or should I call in to support? 

Thanks
0 Kudos
JohnGravois
Frequent Contributor
feel free to log a support call.  im on the phones right now. 🙂
0 Kudos