Why is my Polygon on Google Maps Android API not Appearing? -
Why is my Polygon on Google Maps Android API not Appearing? -
i in java class:
//this in on create gamemapfragment map = new gamemapfragment(); onmapready(map.googlemap); ... public void onmapready(googlemap map) { map.movecamera(cameraupdatefactory.newlatlngzoom( new latlng(-18.142, 178.431), 2)); // polylines useful marking paths , routes on map. map.addpolyline(new polylineoptions().geodesic(true) .add(new latlng(-33.866, 151.195)) // sydney .add(new latlng(-18.142, 178.431)) // republic of the fiji islands .add(new latlng(21.291, -157.821)) // hawaii .add(new latlng(37.423, -122.091)) // mount view ); }
yet shows map without points - not polyline. how create polygon visible?
it looks should calling map.getmapasync(this);
instead of onmapready(map.googlemap);
in oncreate
(assuming activity
implements onmapreadycallback
).
android google-maps
Comments
Post a Comment