0

I have customized a map with the google maps engine and I have the corresponding url. I just want to load this url inside a div by using the simple load() method. Unfortunatelly, I get a P3P error message.

    jQuery('#map-canvas').load( "https://mapsengine.google.com/map/edit?whatever", function() {
        alert( "Load was performed." );
    });

The error I'm getting:
This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info. The info in the link is not as usefull as expected.
Any hints?
How can I accomplish the P3P policy and load the map?

user997593
  • 423
  • 5
  • 16
  • I think that link you're trying to load requires from users to be logged (and to be your collaborators). Click on Share and then choose "public" (currently is set to "private"). Then, link will look like this https://mapsengine.google.com/map/viewer?mid=zVaqC0zLiHfo.ksfr3VZn9GpE – Miljan Puzović Apr 09 '14 at 10:30
  • I've already made it public, but there is a chance that I copied the url from the wrong place. Let me try something... – user997593 Apr 09 '14 at 10:48
  • It looks to me that you've copied the wrong url. – Miljan Puzović Apr 09 '14 at 10:56
  • Now I have the right URL, and also the alert is fired, but there's nothing loaded in the div. – user997593 Apr 09 '14 at 11:26
  • Of course. Look at this http://stackoverflow.com/a/14999705/1550040. You can't load content from external site. You can use iframe or some trick like in above link. – Miljan Puzović Apr 09 '14 at 11:36
  • Hi Miljan, you were right and the php trick solved part of the problem, but only part. If I access the php 'grabber' straight with the correct url parameter, it will start loading the map and suddenly I will get an alert from google itself saying that the site doesn't have the rights to use the given Google Maps ID, so it detects that the request is coming from a server, nor a browser and it gives me a link to the Google Enterprise Support Portal – user997593 Apr 09 '14 at 14:49
  • Ahhh, well... Iframe then? :) – Miljan Puzović Apr 09 '14 at 18:08
  • With iframe I get "Load denied by X-Frame-Options: https://mapsengine.google.com/map/edit?mid=whatever=1 does not permit cross-origin framing." I realize that "viewer" has been replaced by "edit" in the url when I get the response. – user997593 Apr 10 '14 at 10:09
  • So finally it seems impossible to load a customized map inside a website, not even by an iframe. Thanks for your time and I will post a different question regarding jquery-ui-map to achieve a similar result... – user997593 Apr 15 '14 at 16:44

1 Answers1

0

$(function() {$("#map").googleMap({zoom: 10, // Initial zoom level (optional)coords: [48.895651, 2.290569], // Map center (optional)type: "ROADMAP" // Map type (optional)});})

nagendra
  • 98
  • 3
  • If I do this, I will just initialize an ordinary Google map. I would like to load a Google map that contains info that I have already added to it by means of the Google Maps engine. – user997593 Apr 09 '14 at 11:16