java me - Showing Google Map in j2me -
string url = "http://maps.google.com/maps/api/staticmap";url += "?zoom=13&size=" + width + "x" + height;url += "&maptype=roadmap";url += "&markers=color:red|label:a|" + lat + "," + lon; url += "&sensor=true";
my first attempt static map center location , zoom level , worked when i'm adding markers url i'm getting same image no markers.
i'm doing same google map api doc cant figure out whats wrong.
is there other way show map in j2me application??
there fundamentally 2 ways show maps in java me application. method of making http request map server best suited situations need 1 single map image. since each map update require more network traffic. if need series of images, add custom markers or want dynamically update map, better off using dedicated library uses tile server, caches map tiles , overlays objects on top of it. reasoning behind described here
the dynamic mapping library recommend here maps api java me, can tell name, api designed work java me devices.
the api bundled nokia asha sdk 1.0, despite this, in reality separate independent plugin , has been designed work full range of standard java me devices.
a similar stack overflow question answered here describes how download it.
the code display marker on map can found in developer's guide
map.setstate(new mapdisplaystate(new geocoordinate(51.477, 0.0, 0), 15)); mapstandardmarker marker = mapfactory.createstandardmarker( new geocoordinate(51.477, 0.0, 0), 10, "hi!", mapstandardmarker.balloon); marker.setcolor(0xffff0000); // color red map.addmapobject(marker);
as notice of affiliation, should mention in passing work nokia.
Comments
Post a Comment