118
Views
6
Comments
[Google Maps Heatmap] Multiple heat maps per page
Question
google-maps-heatmap
Web icon
Forge asset by Harlin Setiadarma

Hi - 

It appears, that the server action SetHeatMapData - is not directed at a particular map if there are multiple on a page. Therefore if you are trying to display two maps, they look the same. 

I may be wrong, but it seems this way? Possible improvement.


Regards, 

Johann

UserImage.jpg
Johann Pickard

Is it possible to perhaps add a non-mandatory input, through which you can specify the HTML element you are pointing the javascript at? 

UserImage.jpg
Johann Pickard

* sorry, that is not the issue with having multiple heat maps. 

All that needs to be changed is that the name of the "get points function", have to be the same in the definition of the function and the call of the function. 


All sorted. 


2024-03-25 06-19-08
Harlin Setiadarma

Hi, glad you have it working.

Sorry I didn't reply on this thread because we already have chat in PM.


All that needs to be changed is that the name of the "get points function", have to be the same in the definition of the function and the call of the function.

What did you meant by this?

I want to make better documentation on my Forge, and this will help a lot...

UserImage.jpg
Johann Pickard

Sure - I will send through screenshots as well a bit later. 

UserImage.jpg
Johann Pickard

All I was saying was that to address the point of having multiple different heat maps on a single page, you need to define the function name as a variable. 


To do this you need to just introduce it as a variable in the javascript in the statement that "calls" the function. 

see below

The function name that is called


And additionally the same name in the place you 


defined the function. 

Just a suggestion on an improvement that could be made to the component. 





2024-03-25 06-19-08
Harlin Setiadarma

That's a great idea... 

Thanks. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.