how to use ajax in a tracking webapp

Topics: SharpMap Project, Web Controls
May 18, 2010 at 10:45 PM
i want to make a tracking app using webmapping by sharpmap, but i don't know how to put the points in the map using ajax, should i edit the shapfile in server side then synchronize the shapefile or send the points from server to client to draw them on the map by JS ?? i don't know how to do that i'm a new user of sharpmap ?? any idea or suggestion will be very helpful thanks :)
May 19, 2010 at 9:39 AM

geek11, personally I would use OpenLayers as a client , and SharpMap as a wms server, then I would send the 'tracked' items to OpenLayers as Json and use an OpenLayers VectorLayer to display them.

Alternatively you could update the backend datastore (use a database though not a shapefile - 0.9 shapefiles as read only) and force a refresh of the map - watch out for browser caching though - you may need to append a random string to the map url to force the browser to fetch a fresh map.

hth jd

May 21, 2010 at 12:54 AM

Your geodata (read shapefiles) should remain the same.  So static!. Dynamic data like the GPS coordinates of a moving car should always be layered on top of this geographic data. There are several scenario's on displaying dynamic data on top of static data but none of those will put dynamic data into geographic data. You must consider displaying your dynamic data on top of the geographic base data.  An open source tool like Openlayers offer functionality which can be used with several 'free' data source.  Mapping API's are provided by Bing or Google or Open Street Maps

May 23, 2010 at 8:55 AM

thanks johndiss and zarmac for your suggestions, it was very helpful for me , now i'm working on sharpmap as WMS and openlayers in the clientside which can retreive data from a webservice of tracking using ajax

thanks :)


Mar 7, 2011 at 6:42 PM

Hi geek11.

Have you created this project?

Can you help me about retrive data?