Since Google Earth functions are gone in Civil3D 2013 I thought it might be possible to create something ourself. But because the Google Earth API is depricated and not available in newer versions of Google Earth (as far as I know), we need another approach. There is a Javascript API and with a free API key we can use Google Maps.
A few years ago I created a web environment in PHP and used the API to create Maps with markers where company projects were done. The projects could be geo referenced and the locations were saved in the database. To show them on the map, I made it possible to do a database search for projects in a certain year and a given distance from a location. With this system it was possible for the company to see if there were projects done in the past at a certain location.
So, in .NET we might create a Form with a few buttons and a browser object. I thought, what if we communicate with the browser object to set a location. As soon as we have the map in the Form at the right location, we perform a screenshot action of the browser part and paste it into AutoCAD.
But there are some things I am not sure about if it works.
- Calling the Maps API with the API Key can only be done from a reachable web server. So you can't just create HTML on the fly in a temp map and access the API.
- Is it easy to get access to the Javascript functions to get back the location and zoomfactor, or do we need to read the DOM from the browser object.
- Is it possible to not use the API but just throw an url to the browser object to find the location in Maps and is it possible to get the zoomfactor back from the URL or the DOM without using a Key. This way we can use html on the fly or just an url instead of a reachable web server.
(- Is it allowed to use screenshots of Maps in commercial drawings)