I’m not sure exactly when this happened, but the web-based Google Maps service has changed quite a bit. I’ve built a custom map including the routes of most hikes and added about 100 embedded maps to this hiking blog over the last 3 years. Now, it appears that all the embedded maps are broken.
In my testing I discovered that, if you’re logged in with a Google account on another tab in the same browser, then the old embedded maps are still visible. If you’re an anonymous visitor, you get an ugly “this content cannot be displayed in a frame” error.
One lesson learned is that web-based service providers can and do change their service whenever they want to. Free service providers, especially, have no obligation to maintain the service. This is no surprise, really, but a good reminder.
It also makes me think of the concept “if you’re getting a service for free, then in fact your’re not the customer–you’re the product being sold.” I wonder how this concept might apply in the context of Google Maps.
I did expect that Google, being as large as it is, would be a stable service provider. I guess that I was wrong about that.
Perhaps, I’ll switch to a system of using JPG images to illustrate my hike routes, instead of interactive embedded maps. The jpg could still link out to Google Maps. Pages would load faster. It will take awhile to go back and change all the old posts.
Hmmm, I wonder how long YouTube will be free. That can’t last forever, either.
If you click on the “open this content in a new window” link:
UPDATE 1/18/2015:
The day after I reported that all my embedded maps were broken, I noticed that they were working again. However, I’m still having difficulty figuring out how to embed new custom maps with the desired location centered in the view. Also, when Internet Explorer (v9 32-bit on Win 7) renders the page, it erroneously jumps down to the embedded map. I’m glad this is just a personal blog and not my livelihood.
Interesting insights and reminders. That’s gotta be frustrating and disappointing. Good luck on your solution implementation.
What a bummer…..but get yur point.
Yup. I found your blog article searching for that error, since my YouTube videos, which are using the standard iframe bit provided by YouTube/Google themselves…are broken.
I couldn’t get any of the various simplistic suggestions around the web to work for embedding a google map link in an iframe.
I ended up using a google map API script instead of an iframe, generating the initial code by filling in the boxes at:
http://www.map-embed.com/
and modifying the resultant code to suit my purposes.
You could use the link above to gen the code for your own map, and then optionally use my modified code with the longitude and latitude produced by the above web site copied into my code. You can also insert your own html into “content” below, independent of what the above website produces.
<?php
// IE won't work with percentage height and FF won't work with em units.
// Simple code here assumes if browser isn't IE, then is FF;
// And I don't care about other browsers.
//
$height = "$browser" == 'ie' ? '25em' : '99%' ;
$width = "$browser" == 'ie' ? '99%' : '99%' ;
echo <<<XXXEODXXX
#gmap_canvas
img
{
max-width:none!important;
background:none!important
}
google.maps.event.addDomListener ( window, ‘load’, init_map );
function init_map ()
{ var myOptions = { zoom:12, center:new google.maps.LatLng ( 41.1889495, -104.1781593 ), mapTypeId:google.maps.MapTypeId.ROADMAP };
map = new google.maps.Map ( document.getElementById ( “gmap_canvas” ), myOptions );
marker = new google.maps.Marker ( {map: map, position: new google.maps.LatLng( 41.1889495, -104.1781593 ) } );
infowindow = new google.maps.InfoWindow ( { content:”Biz NameBiz Street AddressBiz City, State ZipBiz Phone” } );
google.maps.event.addListener ( marker, “click”, function () { infowindow.open ( map, marker ); } );
infowindow.open ( map, marker );
}
XXXEODXXX;
?>
Hello Asok,
I just noticed this comment awaiting approval. Sorry for the delay. And, thanks for taking the time and effort to make the detailed suggestion!
Regards,
Chris