I have a form where users can enter the URLs of Google maps to indicate the address of some things. I was thinking about showing the map through the Google Map API v3, allowing the user to move to the right place and use the button or something to automatically get the URL of the place and copy it to the input.
I was able to display the map using the tutorial, but I was not able to find in the documentation how I could get the url ...
I think you will not need this, but this is a simple code that I use:
var latlng = new google.maps.LatLng(-34.397, 150.644);
var options = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
};
var map = new google.maps.Map(document.getElementById('map-box'), options );
source
share