Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there, looking for some good suggestions as to a nice and easy way to present some location data (eg lat and long) over the top of an image file.

Essentially my application receives data (via usb port) from a remote vehicle(aka racing kart), within this data is the lat and long from the GPS in the kart.

I want to be able to show the last few locations (say last 5 locations) as dots (getting progressively smaller from most recent to least recent) over the top of an image file. The image file is a static map (eg race track).

I know I could load the image file as a background to a form (or other control). And I can create a array to hold the set of location points. Just haven't worked out a reasonable way to show those dots over the image file and have it hold the right aspect ratio.

Probably worth saying upfront; The application, when running will not have internet access, so overlaying on google maps (or like) is not an option. This needs to be standalone solution.

So, any useful suggestions and or examples even references to other similar work much appreciated.
Posted

1 solution

You could use a Panel control for this.

1) Create a Panel.
2) Set the track as Background Image in your panel.
3) Normalize/convert your GPS coordinates to panel X/Y-coordinates.
4) Use a Panel_Paint subclass to draw the last 5 dots from the data array.
5) Invalidate the panel if a new datapoint is received.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900