Using WeightedLocation in HeatMapLayer does not seem to work as expected.


  • In it says that HeatMap can use Locations or WeightedLocations.  There does not seem to be any documentation on WeightedLocation anywhere or how to use it.

    It looks like the Weight value needs to be a value between 0 and 1. In my testing, it does change the intensity; but does not change it across the entire Intensity range. (also from 0 to 1).

    I am trying to create weighted HeatMaps where some points will have an intensity of 0 (the lowest value) and some will have an intensity of 1 (the highest value) and the rest will be somewhere in between.

    For example:

    if I want to plot Monthly sales, I calculate the lowest sale as 0 and the highest sale as 1 and all other sales as a decimal percentage in between.  When I plot the values using the HeatMapLayer, I would expect the point with the highest sale to be red (using the default color gradient) and the lowest sale to be purple and all of the other points to be different colors depending on there sale value.

    Tuesday, December 11, 2018 5:18 PM

All replies

  • Hi Brian,

    Have you looked at the sample in the docs?  Check out 

    It looks like you can control the layer itself. See the definitions at If you look at the left menu, you can review the GeoJSON module to see the values it provides as well.  

    intensity number The intensity of each heat point. This is a decimal value between 0 and 1. This is used to specify how "hot" a single data point should be. Default: 0.5
    opacity number The opacity of the HeatMapLayer canvas. Value should be a decimal between 0 and 1. Default: 1



    Tuesday, December 11, 2018 7:33 PM
  • Thanks loTGirl,

    Yes, I have read all the documentation I could find.

    If I set the intensity on the layer, then all of the data points will have the same intensity, which is not what I want.

    Using weightedLocation, the intensity varies; however, it does not seem to vary across the entire range.

    Tuesday, December 11, 2018 8:03 PM
  • Hi Brian,

    I have reached out to the feature owner for the Map Control and hope to have an answer for you soon.  Your assumption seems like it should be valid however as the other values work on a 0-1 range.



    Wednesday, December 12, 2018 7:51 PM
  • You might want to take a look at Azure Maps, Microsoft's enterprise mapping platform, it provides heat maps that support weights natively. Here are some useful resources:

    Saturday, December 29, 2018 12:31 AM
  • Thanks Ricky; however, we have a fairly large integration with Bing maps and I do not believe that we can use Azure Map controls with our Bing maps license.

    The sample that you showed looks exactly what I am trying to accomplish.  There seems to be a way to weigh the points using the Bing version; but there is no documentation on how.

    Monday, December 31, 2018 4:55 PM
  • Hi Brian,

    I can confirm that the Bing Maps V8 control Team is looking at this for you but unfortunately it is the holiday season and they have not gotten back to me as quickly as I might have hoped. 

    "We definitely need to update our documentation. Earlier this year we shipped the ability to do weighted heat maps. There’s a couple of settings available for how to interpret the weights"

    They would like to understand your specific scenario better though so if you could reach out to with a reference to this thread we can work with you directly.



    Monday, December 31, 2018 6:33 PM
  • I used to be the program manager for the Bing Maps V8 team. Weighted heat maps was something the team was meant to add, but never was when I was on the team. It looks like they have since added form of weighted heat maps in this sample: In order for it to work you have to add points multiple times to give it a weight. For example, if you want to give a point a weight of 2, add it to the array of locations twice. 

    Long term, I highly recommend moving to Azure Maps as it is Microsoft's newest enterprise mapping platform and has a lot more features and better performance. 

    Thursday, January 3, 2019 6:00 PM
  • Hi Ricky,

    Brian is in email contact with the V8 Team and they are providing direct support.  This issue should be resolved with an update to the documentation.

    Sincere thanks,


    Friday, January 4, 2019 10:05 PM
  • A good example of the feature is here . You do not need to input the same location multiple times. In this example, a data set of earthquakes is used. The magnitude of the earthquake determines the weight of the point.
    Tuesday, January 8, 2019 7:48 PM