This project has moved and is read-only. For the latest updates, please go here.

How to display shapefiles in Windows Mobile 5.0 using Sharpmap dlls

Topics: SharpMap Project
Oct 19, 2009 at 4:33 PM

Hello friends,

I am trying to display shapefiles in a picturebox in PDA (windows mobile). I have stored one shapefile in PDA and want to display it in picturebox

If i follow same procedure as that of displaying in Picturebox in Desktop or laptop, it does not work in PDA

It gives several errors about, s) functions.

Can anyone please help me out in this case?



Oct 19, 2009 at 6:07 PM
Edited Oct 19, 2009 at 6:36 PM

Are you trying to use the normal sharpmap dlls? remember Compact Framework does not have all the functionality of the full .Net framework.. try (I do not know what state it is currently in.. it is quite old) jd

Oct 21, 2009 at 1:20 AM

Thanks john,

Got the solution for it. I used sharpmapCF dll and everything fell in place


Oct 23, 2009 at 4:33 AM


can you send the dll to me, i can not compile the project success. thanks. :-)

Oct 23, 2009 at 8:31 AM

hi all,

i have a question is which is the best way to visualize the map in mobile phone, store spatial data in mobile and use SharpMap to render it or call the WMS server thru HTTP to get map ?

if there are dozens of map layers, the mobile cpu can process it fast ?

I'm new in mobile GIS. any suggestion will help me more. :-)

Oct 23, 2009 at 9:15 PM
Edited Oct 23, 2009 at 9:16 PM

Hi cdgrain, there are several things to consider.. Can you guarantee connectivity? Might your users may be undergound or in remote areas? Can you generalize your data so that it takes up less space and renders quicker. How many features are on each layer - if the layers are very sparse it won't really matter how many layers you have. I don't think there is a perfect answer to your question - you just need relate the options to your requirements. hth jd

Oct 24, 2009 at 9:07 AM

thanks john.

if i want to realize the map style like google map that contains many map details, so the best way is to provide wms remotely, right ? at this condition, if rendering map task is given to phone, i think it will do nothing except generating map. i think mobile client just need to display map and query result, map image provider and query function should be given to server side. the network connection is less important, because most of users active in good network environment.

and, if map image and query provided by server side. should i need map control of sharpmapcf as client side like desktop system. and, how do i draw vector layer features according to the coords received by server side, like openlayers client lib to overlay vector lay. is there a client lib can work in mobile phone, like openlayers work in browser ?

Oct 24, 2009 at 1:05 PM

Hi cdgrain, rendering wms remotely will give you more styling options - GDI+ on CF is limited, but there is nothing to stop you doing on the device. Remember most SatNav's are mobile phones or are based on the same chips. You may be able to combine remote wms with vectors by porting the wms stuff from the sharpmap 0.9 trunk - I don't know that much about it though. You could also have a look at implementing Brutile as a Wms caching block for a SharpMapCF client.

For overlaying vectors you could have a look at porting PR s WFS client patch which should allow you to render GML or you could make a custom serialization scheme from which you create SharpMap geometries and add them to a GeomteryCollection.

On the other hand openlayers works reasonably well on WinMo (with the opera mobile browser) and Android.


Oct 26, 2009 at 2:19 AM

Hi john.

PR s WFS client patch was list in right ? it can be used in sharpmapcf ?

if i restrict user to use Windows Moble and Android system, it means that i can use openlayers as mobile client, right ? but, it only works in opera browser ? how does IE browser ?

Oct 26, 2009 at 11:50 AM

Hi cdgrain, yes that was the patch I was talking about - I am not sure if it will work with CF - it was just a suggestion to try it.

The PocketIE browser is absolutely rubbish.. very unlikely you would get a decent result with OpenLayers & PocketIE