Hi I am Newbie in Using ESRI Maps . I have latitude and longitude of all cities stored in my database Now Based on latitude and longitude values I need to highlight the region in the maps .
Can anyone show me some code /point me a articles on highlighting a specific region (Cities) in maps using Javascript
The Javascript API documention is located at the following link so if you haven't already, check it out:
https://developers.arcgis.com/en/javascript/
If you already have the city locations in an ArcGIS Service, you can simply create a Dynamic Layer for it and add it to your map. Here is an exmaple from the Samples section of the website to do just that:
https://developers.arcgis.com/en/javascript/jssamples/map_dynamic.html
If your city locations aren't coming from an ArcGIS service and instead just in a basic table of lats and longs then you'll want to add them manually to the map as graphics. Essentially the way to do this would be retrieve the locations from your DB using your prefered method (a web service probably being the most robust, or you could render them into the page as a javascript array when the page is retrieved if you are using ASP.Net / PHP etc), then loop through the array of locations, create a graphic for each one and add to the map. Something like:
});
I haven't actually run it so likely contains a bug or two but hopefully a starting point. Check out Graphics on the Javascript API reference for more information.