Hello,
I'm quite new to ArcGIS Javascript API. I'd like to generate a Heat map with custom data. So for example, I'd like to indicate certain cities in the map as "hot" while others as "warm". Is it possible to to this using HeatMapRenderer? If so, can anyone please provide some code examples for this?
Any help will be much appreciated.
Thanks and Regards,
Reshma Bidikar
You've probably already seen this sample - Explore Heat Maps | ArcGIS API for JavaScript - which creates hotspots from point density. You mention classifying certain cities as "warm" and others as "hot" - seems like you're wanting to do something more discrete (two possible values). Can you elaborate and provide a little bit more about your data and how you'd like the map to look like in the end?
Hello Chris,
Thanks a lot for your reply. When, what i'm trying to implement is very vague at this moment, its just an idea, but I will try to elaborate.
We will have a tool which does some processing. As an output, it will produce list of locations (possibly latitude,longitude) and some data (possibly a decimal number) regarding those locations. Based on this data, we'd like to indicate the locations with high numerical values as "hot" whereas locations with low values as "cold".
Possible data can be as follows:
Location Latitude longitude Data Value
New york 40.77 73.98 0.98
JFK,NY 40.65 73.78 0.75
Newburgh 41.50 74.10 0.02
Rochester 43.12 77.67 0.54
And so on. We will possibly have categories, for ex. locations with data value between 0 - 0.20 as cold, between 0.21 to 0.50 as warm, between 0.75 to 1.0 as hot, etc.
Is this something that can be done using the heatmap later?
Thanks in advance.
Regards,
Reshma
If you have discrete categories, you could use something like the Unique value renderer | ArcGIS API for JavaScript (UniqueValueRenderer | API Reference | ArcGIS API for JavaScript). With this renderer, you can assign a color value to each category value (three of them per your example). You can also set the transparency as well, and then set the outline to use the same color/transparency as the fill - depending on how many points you have, it may blend nicely into something like a pseudo heatmap. I used maps like this a few years back with some good success.
There's also the new BlendRenderer - BlendRenderer - Lawrence, KS by age and population size | ArcGIS API for JavaScript
But, I would definitely recommend looking at HeatmapRenderer again - HeatmapRenderer | API Reference | ArcGIS API for JavaScript - it just might work for you (see visualVariables).