I have an application with Google maps in it. Currently the maps are rendered in a WebBrowser via the Maps Javascript API.
I have a requirement to make the map interact with the application. Specifically, I have placed markers on the map. The winform needs to register when one of them is clicked, double clicked, etc. and know which one it was. If the user right-clicks on a blank area on the map, I need some way of registering both where to draw the context menu and the lat/long that pixel represents geospatially.
I don't care whether the map remains in a webbrowser control or is replaced with something else. If needed, I can tear the whole thing out and put a new map in there - but it should be Google (because we have the expensive enterprise API) and it absolutely has to remain inside the winform.
How can I accomplish this interactivity?
Create a new map by signing into your Google account, clicking the Map icon. 3. Then click the hamburger menu (in the top left hand corner) and then click “Your Places” (about half way down) Page 2 2 4. Click the “Maps Tab” then click, “Create Map” down the bottom.
For easy and reliable navigation, use the Google Maps app in your car. Maps will guide you with real-time traffic information to find the best route to your destination.
You can use Google Earth, the platform that enables you to view any place on Earth -- including terrain and buildings, galaxies in outer space and canyons of the ocean -- to view live images. To be able to view Google Earth live you need to install their client software.
Almost missed the part where you said you're willing to replace the web version with something else.
Have a look at Great Maps - for Windows Forms and WPF. It is a custom WinForms control you can drop on a form.
It supports a lot of map providers, Google Maps included. They have a demo with which you can play and see how it works and how it can be integrated.
From experience, I can say that it is possible (quite easily) to bind to map events (marker clicked, double clicked as well).
Something worth noting is that using Google Maps with it might violate Google's terms of use (you also get a warning in the demo app). You can always explore some of the free providers, like OpenStreetMap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With