Many years ago when I was young, naive, and just starting off my career as a software engineer I was under the impression that whilst as a graduate I could expect to be on a steep learning curve, I would reach a point where although I would have to continually refresh my skills to keep pace with the latest technologies, my knowledge would be such that the learning curves wouldn’t be so steep. Fast forward 13 years and I can confirm that I was utterly wrong in this and I’ve hardly been off a learning curve for any of that time (and when I have I’ve been bored stiff!), and the learning curves don’t diminish either – which is not a problem as I still love acquiring new skills and improving the ones I have and hope I always will.
One of my latest learning curves has been to get mapping technology embedded in LabVIEW for a GPS application I am developing, and have found that there are a number ways of doing this.
The simplest way appears to be use an embedded web page and then build up a static url to generate a map and markers etc. If all you want on your GUI is a static map image then this is probably the best way to go, but it does have the drawback that if you want to alter any of the data then you will have to alter the url and reload the webpage which even for a mega fast connection is going to seem too slow so for any kind of dynamic applications this will not be appropritate but if you’re interested in doing this then the link below will take you to the Google Static Maps API, and I have also provided a link to a LabVIEW implementation using the API.
Another possibility I looked at was to use Google Earth instead as there is a very comprehensive API and by doing a search it appears a number of people have done this in LabVIEW and an API has been created, but it was a bit more in depth than I was looking for but is probably the way to go if you really want to unleash the power of Google Earth and use all of it’s many fantastic features. Please see link below as a starting point but also do a search as there are a number of articles and discussion forum posts on this.
The option I eventually went with was to use an absolutely fantastic free 3rd party .NET assembly called GMap.NET which I have found to be incredibly robust, very easy to interface to, and also very easy to learn how to use with a major caveat: I have been bitten a few times now using 3rd party .NET assemblies directly from LabVIEW – I’m not sure if it is because I am making a mistake in the way I am using a particular assembly, or whether there are some incompatibilities between LabVIEW and the specific assembly but I’ve generally learnt to be wary.
Another issue that I’ve found is that code where I’ve interfaced directly to a 3rd party .NET assembly not designed in a LabVIEW friendly manner it can get incredibly messy and almost unmanageable very quickly where you are always having to construct .NET specific objects such as Lists etc – although I wouldn’t call this a deal breaker.
Luckily I have about 3 years of .NET C# development experience under my belt (although this assembly should only require basic knowledge to understand), so my approach almost always to using .NET assemblies these days is to embed the 3rd party assembly within my own assembly that I have tailored for my application context and to play nicely with LabVIEW i.e.native strings, arrays etc.
This has been my approach here which has meant that with very little pain I have successfully embedded Google Maps within my application with most of the functionality I require within a couple of days of work and has so far had total robustness and is very fast and responsive too.
As you may be able to deduce from the screen dump, I have been using Actor Framework for this application and the map itself is an Actor which should make it good for reuse too.
Please find links to the GMap.NET software itself as well as the tutorials that I have used to develop my application below, and thank you for reading.