+ 1
How can I add specific location from google map to my website
I want to add specific locations from google map in my website! My website programmed with HTML ! Is it necessary to use another programming language such JavaScript?
2 Answers
+ 2
script:
<script>
var x = document.getElementById("test");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "when Geolocation isn't supported or something .";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
0
Here it is! A fully description how to add map
https://support.google.com/maps/answer/144361?co=GENIE.Platform%3DDesktop&hl=en