I have a table in SQL Server with geometry column.

I save geometry like : geometry::Point(@Lat, @Long, 4326)and this results the geometry for the given lat/long.

Now when I publish this layer in GeoServer with Declared SRS :EPSG:4326 and download the KML. It does place the point at right place on Google Earth and the layer does not render at right place in Open Layers as well.

What is wrong?

  • Your geometry Point constructor should be (longitude, latitude) – Vince Nov 22 '19 at 13:14
  • Thanks ! This made the points available at right place in google earth using KML .. but why ? msdn says to use lat/long : docs.microsoft.com/en-us/sql/t-sql/spatial-geography/… ... But, The points are still not visible in openlayers. – user684805 Nov 22 '19 at 13:28
  • I have a function in angular which has been showing the layers from an array properly except this layer. – user684805 Nov 22 '19 at 13:29
  • The geography constructor is {lat,lon}, but the geometry constructor is {X,Y}. – Vince Nov 22 '19 at 13:31
  • 2
    Please ask your question (just one) in the body of the Question. I won't be answering OpenLayers questions. – Vince Nov 22 '19 at 13:58

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.