-1

This example, url below, uses OL-3 with an option to do geodestic measures uses "var wgs84Sphere = new ol.Sphere(6378137);"

http://www.rhone-mediterranee.eaufrance.fr/milieux-aquatiques/poissons/js/openlayers-v3.19.1/examples/measure.html

How can I set the same variable ("wgs84Sphere") to be used by OL version 5?!

user1939338
  • 117
  • 9

1 Answers1

1

ol/Sphere no longer exists in OpenLayers 5, if you want to measure use ol/sphere methods getArea and getDistance.

Follow the link to see this and some use examples: https://github.com/openlayers/openlayers/releases/tag/v5.0.0

cabesuon
  • 4,860
  • 2
  • 15
  • 24