Black Lives Matter. Please consider donating to Black Girls Code today.

Scattermap Map Customization

I have a plotly dash dashboard with a scattermap. Now my boss has requested me to add a distance tool on the map.

My question: Is this even possible? I know we can add local javascript files to the dashboard. But is the map object accessible from the browser’s global context at all?

Thanks in advance.

VH.

Hi!!! So I wanted to ask what do you mean by distance tool. Is it something like selecting the two points and showing distance between two? So I think if its something like that then you can maybe just register the last click point and current click and find the distance between two, by using google API.

Can you be a little more specific as to how one would accomplish this?

  1. use a file/json to register data points, like the geographical point values given here. Making a button for the purpose of choosing wheather to compute the distance or not will help better.
  2. using Google api is easy just putting the values of geographical points after writing the required script will give the result of distance and other things.
1 Like