Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing a google map that is embedded with an iframe

So I have been looking at Google Maps and they have the feature of "making" your own map and adding in markers and things of that nature through their own interface. The way they have you embedding it on your web site is through the use of an iframe.

I have been reading the documentation for Google Maps and the examples shown are when the map is created on page load using either by static input or dynamically built using a database. This is the documentation I am looking at right now... Documentation

So what I am wondering is whether there is a way to customize the map built using Google's interface in the same way as building it upon page load?

Levi

edit: From reading more about it I came to the conclusion that there are essentially two versions of Google Maps? One for developers and one for someone who just wants a map and doesn't care how it looks or how it is made? Can anyone confirm this?

like image 427
Levi Avatar asked May 30 '09 23:05

Levi


People also ask

Can you customize a Google Map?

The possibilities for customization are almost endless, and it's a great way to easily organize and view your favorite locations on one map. Open Google Maps and click the menu button in the top left corner. Click Your Places > Maps > Create Map. Name your map and enter in a description.

How do you the Google Maps Embed API must be used in an iframe?

The short answer is, use a web page to embed an iframe and load the web page in Tableau. Simply append this in front of your Google Maps URL in Tableau and it should work for you. Thanks for all your work on this solution.

Can I embed a Google Map in my website?

You can embed Google Maps directions, maps, or street view into a personal website. To embed Google Maps, you can navigate to the Menu tab for the HTML code of the specific directions or map view you've entered.


2 Answers

That's correct. An iframe map is just a link to your map on maps.google.com. If you want to have more control over the map, you'll need to create it with the API

  • JS API v2
  • JS API v3 (new)
like image 196
Chris B Avatar answered Oct 20 '22 20:10

Chris B


I know this is an old post, but I'm sure it's still getting a lot of views.

If you don't want to bother with the API scripts and just want to go really basic you can put the iframe style google map inside of a div, then make a parent for that div with overflow: hidden. You can then use it's size versus the size and margins of the child holding the iframe to control which portions of the map people can view ie: top right and left controls, lower info, scale, etc.

If you don't want to totally style a map through the API and need a quick effective solution it's not a terrible route.

like image 25
Rob Avatar answered Oct 20 '22 20:10

Rob