Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display an embedded google map iframe with a marker on a certain latitude and longitude

Tags:

This should be possible right?

I've tried searching for this, the docs show a similar example where you can embed a map with a marker on a certain 'place', like so:

<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?q=place_id:ChIJdd4hrwug2EcRmSrV3Vo6llI&key=..." allowfullscreen></iframe>

Is there a way to show the marker but using latitude and longitude instead of a place without using the js api?

like image 399
madprops Avatar asked Nov 01 '15 16:11

madprops


People also ask

How do I put latitude and longitude in Google maps HTML?

Make a Google Map for the location or contact us page of your website easily with our map maker. All you need to do is insert a name for the map, add in your address and then “Copy iFrame HTML code”. Using the various map functions you can also modify the appearance of the map to your preferences.


1 Answers

No need for JavaScript code nor Google API key:

<iframe src="https://maps.google.com/maps?q=35.856737, 10.606619&z=15&output=embed" width="360" height="270" frameborder="0" style="border:0"></iframe>

Just replace the q variable values with your coordinates.

Note: this doesn't allow more than one point.

like image 168
Chtiwi Malek Avatar answered Oct 14 '22 22:10

Chtiwi Malek