Unfolding: how to get pixel coordinates from Marker?

edited February 2018 in Library Questions

Hi I have a path made by some data related to a bicycle root. I would like to have the path in pixel coordinates, I'm trying something like this:

List<Marker> myMarker;
myMarker = map.getMarkerManager(0).getMarkers();
for (int i = 0; i < myMarker.size(); i++) {
  println(map.getScreenPosition(myMarker.get(i).getLocation()));
}

But it returns very weird pixel coordinates, like

[ 0.0, 0.0, 0.0 ]
[ -8063.0, 195758.0, 0.0 ]
[ 0.0, 0.0, 0.0 ]
[ -10058.0, 247856.0, 0.0 ]
[ 0.0, 0.0, 0.0 ]

What would be the correct method to do so?

Answers

  • Did you check the examples that comes with unfolding? The simpleMarkerApp might be doing what you want. The question is, what type of information do you have under the marker objects? Are they outside your current view in your sketch? Or do you have the proper values in the correct units or providing the proper order (lat-lon vs lon-lat)? For cases like this, a small sample program is better (including some of your data) to be able to assist.

    Kf

Sign In or Register to comment.