MGMaps Lib SDK

MGMaps Lib SDK is open source toolkit to develop mobile mapping applications.
Keywords: MGMaps, OpenStreetmap, J2ME
Read more »
Download »
Buy now »

Latest news

Last at Mon, 5 Jan 2009 19:19:48 +003GMT
Topic: Release 0.8.0
See more news »

Code tips

Integration of LWUIT and Maps Lib SDK

1. See some LWUIT tips here

Using Google My Maps data in your midlet

1. Create My map using maps.google.com. You can use points, lines and polygons, and also styles.

2. Take KML URL from link "View in Google Earth" (with Firefox: right-click to link and Copy link location)

3. URL will be something like http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&output=nl&msid=105363078427352008753.00043feea54d049b32c1b. Replace here one parameter value: output=nl with output=kml.

4. Put the new link to your Midlet code, so it will be:
mapItem.addKmlService(new KmlUrlReader(
"http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&output=kml&msid=105363078427352008753.00043feea54d049b32c1b", false));

5. Compile and run your code. Check the result. It could be that some styles are rendered slightly differently, depending on target device. You may need to adjust styles for required output.

Add new comment

Comments are open

Feel free to add your comments and suggestions here