Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
agonr
Front End Web Development Techdegree Student 5,860 PointsGoogle map embedded or image of map ?
I made a website and currently I'm using a picture of location on Google maps but it doesn't look as good as embedding an iframe of google map on it,I was wondering which is better for consistency , I want less requests so the page will work fast and also load fast.
Here's the part of webpage I'm talking about:
4 Answers
Steve Hunter
57,712 PointsHi there,
I prefer a Google map and a pin. For example, here is a mock-up for a site I worked on. The pin drops onto the map with some simple Javascript. And, I just noticed someone has broken the map size - I shall fix that later! It should be the same width as the white area above it.
I don't think using the Google map has a material impact on site speed/delays.
I hope that helps.
Steve.
Matt Milburn
20,787 PointsI work for a web design agency and we serve a high volume of clients who typically want to display their location with Google Maps as a page design element rather than just placing it within their content or on a contact page.
We debated over its potential impact on performance and found that we could configure the the map to disable most of the user interactions of the embedded map (zooming, scrolling, clicking, etc.) and we don't suffer from any noticeable drawbacks. We also tried the screenshot method at first and it just wasn't good enough. We used background-size: cover to fill the background of a container with the map screenshot and the fact that it would resize to the container dimensions and reduce the quality was a deal breaker for us. On the other hand, we could have just made a very large background image... but then you have a really large image on your hands.
The embedded map won us over once we weighed our options. So go forth and embed!
Google does a good job of documenting these features in a good format.
David Perkins
9,607 PointsI'm no authority on copyright or anything like that so i'm not sure where you'd sit within their permissions guidelines. I've always just used embedded maps so i can't say i've had any experience using screenshots of maps.
Give it a read here https://www.google.com/permissions/geoguidelines.html#maps-web and see what you think?
Steve Hunter
57,712 PointsLicencing is a valid point but I think Google is pretty open-source about its policies. The general licence allows you to "publicly display Content with proper attribution". There are some restrictions to this but that doesn't include just displaying a location. Embedding a map automatically attributes their details and terms.
If you tried to monetize their content, or sell the Content as your own, they'd get the lawyers on you pretty quickly! But just showing a map, or image of one, to include in the contact page of a web site is generally fine.
agonr
Front End Web Development Techdegree Student 5,860 PointsThank you for the replies,I shall put an embedded version of maps as it looks way better !
Steve Hunter
57,712 PointsGood luck!