You are here

SUAS MapServer with Mobile Client I

Blog Terms: 

I assumed that you have some basical Web Map Server knowledge to read this article, some terms I have not explained here to save time.

One year ago I developed MoWMS as my Master Thesis and I began my programming way thanks to the mobile map viewer client for Web Map Server. Programers have always such feeling that you will find your old code very simple and crude after some period of time, yes, I found my old client has many problems in structure and a bad user capability to interact with WMS--it can not load the map from WMS dynamically!

There are some other available WMS or map clients now, some are open source, some are commercial software. Let me compare them here at firstly.

1. J2ME OGC WMS Client

Developed by, and you can download here.
Why I mention it in the first place because it is my first "teacher" when I was developping my map client-- I got some ideas from its workflow and software structure. It is not open source but you can use it for testing and non commercial purpose.
a, Server list bookmark, you can add your WMS server.
b, Zoom, pan, scale level select
c, Free layers select
d, Dynamically load map tile from WMS
BookmarkLayer select


Very clear and simple interface, you can understand how to connect to a WMS and interact with it. It use Single-Tile-Loading Method to load the map dynamically. What is Single-Tile-Loading method? I must stop the comparision and explain some methods of how to get map from map server.

Whatever desktop map clients or mobile phone map clients, they use almost the same ways to load map from server:

I. Single-Tile-Loading Method

Please regard the whole screen of map viewer as one Tile of map. The user move or zoom the map, everytimes the cilent will send a new request of GetMap with the BBOX parameter that is calculated by the boundry of the screen, and new map tile will be downloaded. Look at this image:
If user moves the tile 1 to right, the new BBOX of tile 2 will be calculated, and the tile 2 will be loaded and meanwhile tile 1 will be erasured and be replaced by tile 2 to display on the screen.
Single tile loading

a, Easy to calculate the change of new BBOX parameter
b, Easy to draw(display) the new tile on the screen,easy to get the screen coordinate.
c, Need less memoty
a, Waste connection bandwidth, slowly
The red area has been loaded by tile 1 already, but for the new tile 2, this area will be loaded again. If user moves right just 10% of the tile, but 90% of the old tile will be loaded again. For the mobile clients, the users need explore the map frequently, this will waste much more time to load the whole tile of map everytimes.

II. Intersected-Tile-Loading Method

If user move 10% of the tile 1, then only the new 10% of tile will be loaded. After downloading, the new intersected tile will be combinated with the old one. See next image:

Intersected-Tile-Loading Method

Fisrtly the map is moved left, the green tile will be loaded and combined with the original tile; then move up, the purple sector will be loaded and combined with the combined tile; then move right, load red tile and combine it....... Is it clear?

a, Save connection bandwidth, only the needed tiles will be loaded
a, Not easy to draw(display) the combined tile on the screen because of the complex screen coordinate and BBox of new tiles calculation.
b, Need more memory for the combined tiles

III. Multi-Tiles-Loading Method

Many tiles will be loaded at one time, no merging, no boring coordinate calculation. How could do that?

Multi-Tiles-Loading Method

This is a smart way to turn the mathmatic calculation to programming algrithm. In this image, supposed that 9 tiles were loaded in the same time, and each WMS GetMap url for each tile could be easily got, and those urls will be stored as KEY in one Hash table. The KEYs in Hash table are unique, once map is moving, for example, tile 10 will checked before the loading, the GetMap url of tile 10 will be compared with all the keys in Hash table to know whether this KEY has been stored before: if yes, means tile 10 has already been loaded, no necessary to load it again; if not, means tile 10 is new and will be loaded, the url will be also stored in Hash table meanwhile.

a, No necessary to calculate the coordinate, new BBox
a, Need more bandwidth, more memory to store the data

Ok, there are still other ways to load the map, we can continue our topic now.

2. WMSMobil

Developed by, application version
1.0.x can be downloaded here.
It is not opensource but follows the
Creative Commons licence.

Features:(for verion 1.1, it is commercial and not availible)
a, GPS function, Multi-languages, German, English, France, Italy and Turkish
b, Pull Service:You can select object such as one hotel, then opentime, telephone number and photo will be displayed. You can also search for the street name in the map.
c, Push Service: Around one object, such as one key point of interest, the information with text and photos will be displayed.
d, Support mult-Geodata formats:
Google Maps
Microsoft Virtual Earth
(WMSMobil v1.0.x only support OGC WMS)
e, Dynamically load map tile from WMS, POI selecting, GetFeatureInfo to get detail information for POI
f, Basic layers select, overlay layers select

MenuMap with POI

getfeatureinfooverlay layers select

basic layers selectZoom in

One interesting thing is that this client support GetFeatureInfo request in WMS to get the detail information of POI, you can move the cursor to select one POI in the map.