Pete
Pete

Reputation: 113

How do I place a static google image map url in an img tag?

https://developers.google.com/maps/documentation/static-maps/intro#quick_example

Notice that you don't need to do anything "special" to get this image to show up on the page. No JavaScript is required. All we needed to do was create a URL, and place it within an tag. You can place a Google Google Static Maps API anywhere on your webpage where you can place an image.

How do I place the URL within an tag?

Upvotes: 0

Views: 7242

Answers (1)

Deep 3015
Deep 3015

Reputation: 10075

See this example running from

Quick example

Here In this example I have not used any key but you have to use key as given in documentation to avoid any errors

<img width="600" src="https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap
&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318
&markers=color:red%7Clabel:C%7C40.718217,-73.998284">

Upvotes: 3

Related Questions