User Tools

Site Tools


map_suite_services_edition_vehicle_tracking_samples

Map Suite Services Edition Vehicle Tracking Samples

Centering and Rotating

map_suite_services_edition_sample_centering_and_rotating.jpg

In the project “Centering On Moving Vehicle”, we learned how to have the map always centered on a moving vehicle. In this project, we go one step further and show how to have the map also rotating according to the direction of the moving vehicle. In this project, you will also see how to use the CompassAdornmentLayer that always indicates the north as the map rotates.


Centering On Moving Vehicle

map_suite_services_edition_sample_centering_on_moving_vehicle.jpg

A commonly requested feature when tracking a vehicle for GPS application is to have the map centered on a vehicle as it moves. Implementing this is fairly easy with Map suite using the CenterAt API. In this project, you will see this feature in action with a vehicle represented by a vehicle icon being always the center of the extent of the map. You can also take advantage of this project to learn some other techniques related to GPS such as reading GPS data from a text file and applying a rotation angle to show the direction.


Chemical Plume

map_suite_services_edition_sample_chemical_plume.jpg

In this project, we show how simple it is to display and do spatial analysis with chemical plumes.
The US department of transportation sets standards for protection and isolation zones according to the type of chemical involved. You can find all that publicly available information at http://www.phmsa.dot.gov/

With Map Suite, you can easily build those zones, display them and do spatial analysis.
You will notice an interesting feature of this project is that it combines WorldMapKit wms for street map background display and the actual vector street data for analysis.
For this project, you will need the very latest evaluation or full edition of MapSuiteCore.dll and WorldMapKit Wms.dll for displaying the background street map.


Filter Radar Image

map_suite_services_edition_sample_filter_radar_image.jpg

NOAA (National Oceanic and Atmospheric Administration) makes available for the public Radar images http://radar.weather.gov/ridge/Conus/RadarImg/
Those images show the precipitation activities based on the whole range of dBz scale. (see http://en.wikipedia.org/wiki/DBZ_%28meteorology%29)

You might want to keep only dBz scales superior to 20 which correspond to actual rain. You might also want to add some transparency to better show the layers below the radar image.

This project shows how to filter the image for that purpose. You will see how to create a new filtered image better fit to be displayed on the map. You will find particularly interesting the power of using directly the GDI+ API which is very handy with dealing with a Map Suite GDIPlusRasterLayer.


Rotated Image Style

map_suite_services_edition_sample_rotated_image_style.jpg

This project shows how to use an icon to rotate it according to the direction of some GPS readings. An InMemoryFeatureLayer is used with various Features representing vehicles. For representing the symbol a Custom Style is created inheriting from Style. Notice that the Custom Style overrides the methods DrawCore and GetColumnNamesCore. You will also see how to update the X and Y value of the PointShape making up each feature. This project is based on the Servicess edition, I recommend also to look at the project Vehicle Direction which is a Desktop App. The difference is in the use of the Layers and the drawing techniques to update the position and symbol of the features.


Snap GPS to Street

map_suite_services_edition_sample_snap_gps_to_street.jpg

In this sample we are going to handle the common case of snapping a point to a set of features in a layer. The common case for this is snapping real-time GPS points to road layers. GPS has an error factor and it's nice to display vehicles on a map snapped to the roads they are on. It can also be used for a number of other different cases as well, such as finding not just the road position but the road name. You may display or store the road name for the trip in your database.

In the sample we have set up a road layer; when you click on the map it will find the closest road segment within a tolerance and snap the point to that road. You can click repeatedly around a road and simulate GPS points coming in. Inside of the sample, we have encapsulated the functionality into a method that can easily support multiple layers, varying tolerances, and different data units.

map_suite_services_edition_vehicle_tracking_samples.txt · Last modified: 2017/03/17 03:06 by tgwikiupdate