covert the map coordinate in pixel

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

covert the map coordinate in pixel

Postby zak » Thu Oct 23, 2008 4:04 pm

hi all!! i have a problem.. how can i convert a geoPoint in pixel in jdk 1.0???
when i search either city or address on the map, i'd like to draw an icon on my "address found list" , i don't know how i can do it!!! is there anyone can help me?? thanks
zak
Freshman
Freshman
 
Posts: 8
Joined: Tue Sep 23, 2008 8:42 am

Top

Postby Malefico » Tue Nov 18, 2008 9:03 am

mTarget is your GeoPoint

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. // Converts lat/lng-Point to OUR coordinates on the screen.
  2.  
  3.                         Point myScreenCoords = new Point() ;
  4.  
  5.                         mapView.getProjection().toPixels(mTarget,myScreenCoords);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


you have myScreenCoords.x and myScreenCoords.y for pixel coordinates
Malefico
Developer
Developer
 
Posts: 30
Joined: Fri Oct 24, 2008 3:32 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 2 guests