Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - OpenStreetMap MapView calculating screen position of overlay

OpenStreetMap MapView calculating screen position of overlay

Tutorials that use the MapActivity. Many using GPS functionality.

OpenStreetMap MapView calculating screen position of overlay

Postby mtalha » Wed Sep 21, 2011 4:24 pm

I am using the mapview.getProjection.toPixels(iGeoPoint, Point); function to calculate the screen position of the overlay item, but somehow the position is incorrect that it is too out of the screen width and height.

As an example the Geo Coordinates for San Francisco are 37.61666667 and -122.3833333 and I set the map centre to this position and it moves to SFO, but toPixels returns -89117 as x and -29602 as y, which is not correct, it should be some value greater than (0,0) LeftTop and and less than mapview.getWidth(), mapView.getHeight() which is the bottomRight.

Am I doing something wrong here?? In fact I have to draw text on the marker, so I need the positions.

Please help.

Kind Regards,
Talha
mtalha
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Sep 21, 2011 4:10 pm

Top

Return to Map Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests