OpenCellID Client for Windows Mobile: OpenCellClient

décembre 29th, 2008 • By: admin opencellid

Welcome to the latest OpenCellID client, running on Windows mobile: OpenCellClient.

This project will be integrated with another project from the same team: RemoteTracker.
Enjoy and thanks for this contribution.

Using LWUIT with J2memap

décembre 27th, 2008 • By: admin 8Motions, J2memap, tutorial

One of J2memap user wanted to use the application with the LWUIT framework from Sun. So, after some research, it appears that only one modification was needed: a callback to notify the host that the screen needed to be repainted.
This has been done by adding a new callback in the mapDisplayListener:
asBeenRepaint();

So here is the code of the”MapElem” that can be easily added in a LWUIT environment


class MapElement extends Component implements MapDisplayListener {

private final MapDisplay map;
private com.sun.lwuit.Image buffer;
private javax.microedition.lcdui.Graphics bufferGraphics;
private boolean painted;

public MapElement() {
this.map = new MapDisplay();
}

public MapElement(final MapDisplay map) {
this.map = map;
}

public void paint(final com.sun.lwuit.Graphics g) {
if (!painted) {
map.sizeChanged(getWidth(), getHeight());
buffer = com.sun.lwuit.Image.createImage(getWidth(), getHeight());
bufferGraphics = new ImageWrapper(buffer).getGraphics();
map.addListener(this);
}
map.paint(bufferGraphics);
g.drawImage(buffer, 0, 0);
painted = true;
}
// Pass LWUIT Component events to the map
// -------------------- Start ----------------------------//
public void pointerDragged(int x, int y) {
map.pointerDragged(x, y);
}

public void pointerPressed(int x, int y) {
map.pointerPressed(x, y);
}

public void keyPressed(final int keyCode) {
map.keyPressed(keyCode);
}

public void keyReleased(final int keyCode) {    }

public void keyRepeated(final int keyCode) {
map.keyRepeated(keyCode);
}
public boolean mapKeyPressed(MapDisplay arg0, int arg1) {
return true;
}

public void onMoveEnd(MapDisplay arg0) {    }

public boolean oneLocationSelected(MapDisplay arg0, Marker arg1) {
return true;
}

public void hasBeenRepaint(boolean completed) {
repaint();
}
}

You also need the ImageWrapper class , available here:


package com.sun.lwuit;
public class ImageWrapper {
private final Image image;

public ImageWrapper(final Image lwuitBuffer) {
this.image = lwuitBuffer;
}

public javax.microedition.lcdui.Graphics getGraphics() {
return ( javax.microedition.lcdui.Graphics) image.getGraphics().getGraphics();
}
}

Update: the lwuit getGraphics don’t return anymore an LCDUI graphics, but an Object that need to be casted to an LCDUI Graphics

Reblog this post [with Zemanta]

WhereAmI: new Blackberry application for OpenCellID

décembre 17th, 2008 • By: admin Announcements, opencellid

New application for blackberry from Ari Volcoff, using OpenCellID: WhereAmI!

product:242952WhereAmI?

Windows Mobile client for OpenCellID

octobre 30th, 2008 • By: admin opencellid

Just forgot to say this, but dale lane created a Windows mobile client to fill OpenCellID database. All the informations are available on his blog: Programmatically getting the CellID from your Windows Mobile phone. The post contains also some great informations related to CellID for Windows Mobile, informations which are not always so easy to find!

screenshot of FindMe
Reblog this post [with Zemanta]

New J2memap SDK available (v0.961)

octobre 30th, 2008 • By: admin Announcements, J2memap

Update of the SDK, with several improvment

* Already present in the latest version, but not yet announced here:
- Architecture rework, with the ability to display the map on a different canvas (not only his own canvas)
- Marker can have their own Style (MarkerStyle) shared between several markers. Note that by default, you still can use the old mode and change the
colors and pins attribute on the Marker, because the default style use
them directly.

* Several simplification: everything related to “typeSat”, “isSat”, and so on: satelite is just treated as a map like others. So to display YahooSat just do MyMap.setMap(”YahooSat”);

* The numSat is dropped too, as the list of mapping provider is dynamic. See belo, use setMap using a name if this sat is in listOfMap or setMap(MapOverlay) .

* Ask.com has been removed from the default map (they now use Microsoft maps).

* OpenStreetMap has been added in the list of default map provider.

* The “generic layer” support new quadtree URL

These should be minor changes from the external point of view, just by removing a few vars in your creation but this should clarify the usability.

Other improvment:
- the ressampled mode is much better
- cached map reactivation. You can put map in your jar file, or in the file system. A tutorial on this later.

The samples has been updated to reflect this. As usual, you can go to the J2memap web site to dowanload it…

Reblog this post [with Zemanta]