gpsgeometrymap-projectionsnutiteq

How can I turn MapPos/(long,lat) into Pixels under Nutiteq?


I have deeply read the Nutiteq Api Reference and I haven't found built-in Methods to get the pixel representation of longitude and latitude on a device. There is nothing under the existing Projections, so I don't know how I could overcome this issue.

What I want to make is drawing a circle for my actual GPS Location like this, enter image description here

NOT like n-vertices Polygon in HelloMap3D.

Getting Pixels of lat, lon and radius given Zoom Levelunder a given Projection is the Challenge because the rest would be calls like this

...
canvas.drawCircle(longitudeInPixel, latitudeInPixel, radiusInPixel, this.paintStroke); // <- For blue circunference
canvas.drawCircle(longitudeInPixel, latitudeInPixel, radiusInPixel, this.paintFill);   // <- For blue translucent circle
...

So, how could I turn lat, lon and radius into their pixel representation under Nutiteq?

I thank you all in advance.


Solution

  • MapView has worldToScreen() method for this, see Map Calculations page in the Nutiteq Android demo project wiki.