Monday, 15 March 2010

android - Get geographic location from screen location -



android - Get geographic location from screen location -

i'm working on application uses google maps. can geographic location of particular point on screen?.for example, have view (button, image, etc) x , y position on screen. want know geographic location (latitude , longitude) of position (view position). of course of study position (x , y) on map.

in short yes(your questions lacks details , own attempt), drop marker on screen @ current location , set marker property draggable. allow me move marker position on map

for example,

private googlemap mmap; mmap = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map)).getmap(); mmap.addmarker(new markeroptions() .position(new latlng(your_lat, your_lng)) .title("my marker") .draggable(true));

after placing anywhere want can retrieve markers new latitude , longitude using position function. this.

android google-maps geolocation

No comments:

Post a Comment