How to add a scale or a ruler in Palantir Foundry Map?

91 Views Asked by At

I would like to know how to add a scale to the Foundry Slate Map.

Is there an attribute to enable as in Google Maps? scaleControl: true

Or how to add a ruler as in Google Maps?

There are several attributes that can be used to calculate the distance between two points in Maps widget.

  • zoomLevel
  • bounds.northEast.latitude
  • bounds.northEast.longitude
  • bounds.southWest.latitude
  • bounds.southWest.longitude

Using these attributes, I tried to add a ruler with a fixed length but with a distance value updating accordingly. But it is not successful.

Thanks, Madhubhani

1

There are 1 best solutions below

1
ZettaP On

There is a dedicated map application which has a scale. Maybe that would help you in this particular instance ?