java - Google Maps API error location manager -
i started playing around today google maps api first time got error , have no idea how fix it.
i have no idea why locationmanager giving error: cannot resolve symbol 'locationmanager'
thanks in advance,
for full code go to: http://pastebin.com/7cy8gyyf
here part of code:
private void setupmap() { mmap.addmarker(new markeroptions().position(new latlng(52.279413, 5.194046)).title("l")); // enable mylocation layer of google map mmap.setmylocationenabled(true); // locationmanager object system service location_service locationmanager locationmanager = (locationmanager) getsystemservice(location_service); //create criteria object retrieve provider criteria criteria = new criteria(); //get name of best provider string provider = locationmanager.getbestprovider(criteria, true); //get current location location mylocation = locationmanager.getlastknownloacation(provider); //set map type mmap.setmaptype(googlemap.map_type_hybrid); //get latitude of current location double latitude = mylocation.getlatitude(); //get longitude of current location double longitude = mylocation.getlongitude(); //create latlng object current location latlng latlng = new latlng(latitude, longitude); //show current location in google map mmap.movecamera(cameraupdatefactory.newlatlng(latlng)); //zoom in google map mmap.animatecamera(cameraupdatefactory.zoomto(20)); mmap.addmarker(new markeroptions().position(new latlng(latitude, longitude)).title("you here")); }
java case -sensitive . have declared variable 'locationmanager ' , trying access 'locationmanager'. notice case of 'm'.
Comments
Post a Comment