The Archives

SEARCH

Follow us :

twitter link

Changer la langue

Tools Box

Archive for January, 2007

J2memap Tutorial #1: Hello Map!

Posted in: tutorial MMT by admin on 20 January 2007

I will start a series of tutorial around J2memap as a powerful library to be used to display gelocalized content.

This first tutorial will focus on the easiest thing to do: display a map on a phone! With a few line of codes, you will have the equivalent of GoogleMap on your PC…

That’s quite easy. You can do this using Java Wireless Tool Kit. Create a new project (in that case “HelloMap“), give the midlet class name (in this example net.landspurg.test.HelloMap ). Just put the library (you need to contact me to get it) in the “libs” folder of this project.

The steps are pretty simple:

* intialize utilities:

UtilMidp.checkMidp(Midlet)

* Then, create a map canvas:

MapCanvas m_map=new MapCanvas();
m_map.init();

* Now, display it:

display.setDisplay(m_map);

Now, you have a fully fonctional GoogleMap/Yahoo/Ask.com/MSN Live interface, with scrolling, zooming, etc…

All these default behavior can be changed, will see this later on….

The complete source code is here:


/*
 * HelloMap.java
 *
 * Created on 11 janvier 2007, 20:10
 */

package net.landspurg.test;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import net.landspurg.util.*;
import net.landspurg.map.*;
/**
 *
 * @author  tlandspurg
 * @version
 */
public class HelloMap extends MIDlet {
    MapCanvas m_map;
    public void startApp() {
                // DO NOT FORGET TO INITIALISE UtilMidp! contains some static function
                // used by MapCanvas....
                //
        UtilMidp.checkMIDP(this);  //Initialise the utility library...
        m_map=new MapCanvas();
         m_map.init();
                Display d=Display.getDisplay(this);
                d.setCurrent(m_map);
    }
   
    public void pauseApp() {
    }
   
    public void destroyApp(boolean unconditional) {
    }
}

Technorati Tags: , , , ,

V09.17

Posted in: Release by admin on 17 January 2007

A few bug corrected:

* “Space” key is now available in text field (but corrected for Sony Ericsson)
* Upgrade with new Google maps/satellite
* Fixed a bug in GPX file interpretation (thanks Brandon)

J2memap semi finalist of the LBS-Challenge

Posted in: Event by admin on 9 January 2007

Good news, the application that we are currently developping, based on the J2memap technology is a semi finalist of the LBS Challenge organised by Navtek, sponsorised by Nokia, Garmin, Telefonica.

So I will be at the 3Gsm in barcelona to present it at the final. I hope also to present the “new” generation of application, based on J2memap, and the associated Web Site!