0

I am outputting the coordinates. However I am trying to output the degrees instead. How is it possible? My PostgreSQL query looks like that:

SELECT * FROM view_parcels p WHERE st_contains(p.geom,ST_GeomFromText('POINT(33.34579 35.13428)'))

JS:

map.on('click', function (evt) { 
  console.log(evt.coordinate); 
});
  • 2
    Use toLonLat() to transform the coordinates, e.g. console.log(ol.proj.toLonLat(evt.coordinate, map.getView().getProjection())); – Mike Mar 26 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.