Solved! Go to Solution.
Steve,
Please add the line below to your proxy.config.
<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
Javascript can be picky when an extra comma exists or is missing, in the code box below. Notice the code section below, I removed the commented section that each entry in the [ ] is separated by a comma except for the very last entry. That is the correct format.'Services':[ {"Name":"Libraries","Image":"images/library.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/4","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Post Offices","Image":"images/postOffice.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/3","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Police Stations","Image":"images/policestations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/1","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Fire Stations","Image":"images/fireStations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/2","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Hospitals","Image":"images/hospital.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/0","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true} ],
Let me know how it goes.
-Lindsay
Hi Lindsay:
I read with interest your replies to Steve.
Can you please explain what the difference is between setting "HasRendererImage" to true and "HasRendererImage" to false.
In the template they were set to 'false'. I see that in your examples, they were set to 'true'.
Thank you.
Rocky
Steve,
Please add the line below to your proxy.config.
<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
Javascript can be picky when an extra comma exists or is missing, in the code box below. Notice the code section below, I removed the commented section that each entry in the [ ] is separated by a comma except for the very last entry. That is the correct format.'Services':[ {"Name":"Libraries","Image":"images/library.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/4","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Post Offices","Image":"images/postOffice.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/3","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Police Stations","Image":"images/policestations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/1","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Fire Stations","Image":"images/fireStations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/2","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}, {"Name":"Hospitals","Image":"images/hospital.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/0","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true} ],
Let me know how it goes.
-Lindsay
Hi Delvin,
If you aren't using the service http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer in the config.js " in the configuration then you shouldn't need it. However, if you are using the Esri Geometry Service then it needs to be in the proxy because the application is using the service to do the buffer.
-Lindsay