I have a project where I need to append circles to a google map. I've been using the Google Maps API with success to retrieve data BUT to control the map from within a AHK GUI to overlay a circle based on coordinates is proving beyond me.
I've found this example of what I want to do: https://developers.google.com/maps/documentation/javascript/examples/circle-simple
And this reference too: https://www.w3schools.com/graphics/google_maps_basic.asp
But basically I can't figure out how to convert the function from Javascript to AHK and call it.
Code: Select all
function myMap() {
var mapProp= {
center:new google.maps.LatLng(51.508742,-0.120850),
zoom:5,
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
Code: Select all
Gui Add, ActiveX, vWB xp yp+50 w1200 h700, Shell.Explorer
WB.Navigate("https://maps.googleapis.com/maps/api/js?key=MYAPIKEYISHERE&callback=initMap&v=weekly") ; simply navigate to web page make it as fit as possible to gui
initMap()
{
map = new google.maps.Map(wb.document.getElementById("map"),mapTypeId: "SATELLITE")
;zoom: 4,
;center: { lat: 37.09, lng: -95.712 },
;mapTypeId: "terrain",
}
Many thanks
R