creating new point with different coordinates not changing the position. First point The bellow code create a point on the map

VectorLayer pushPinLayer = new VectorLayer("PushPins");
            position1 = new Coordinate(10, 10);

Second point But this case also the the point created on the same point

position2 = new Coordinate(20, 20);

Could you please tell me why both points are in the same place.And could you please tell me how can i make a point from latitude and longitude.

I am using Google Mercator"


The most likely reason why they appear in the same place is that you are looking at two points of ~14 metres differences, at a scale where they aren't distinct.

The coordinate lengths are in the spatial reference system (e.g. in Google Mercator based on your question) you are using - you need to do a transformation to convert between spatial reference systems.

If this is not a familiar concept, please use a search engine or look for other questions on this site that relate to spatial referencing. Once you understand the concept, the API will make sense. Until then, you are going to get really strange results, and creating hard-to-fix bugs for the future.

For a slightly out-of-date explanation, see https://sharpmap.codeplex.com/wikipage?title=Apply%20on%20the%20fly%20transformation%20to%20a%20layer however the concepts are not SharpMap specific.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.