There you go. Mapdev, all your customers need to do is use the same code as
Rossko's page and it will work.

Regarding the $_SERVER and $_REQUEST variables, those are leading you
astray. If your customer slurps up the HTML/JavaScript code from your web
service and then sends that code to the browser *as part of their own page*,
then the request to your server is irrelevant. The API key will be validated
against the domain *in the browser*.

So putting on my best Sherlock Holmes hat, I'll hazard a guess: If your
customer is indeed using an iframe, then what they are doing is loading the
iframe SRC from *their* domain, not yours - and then merging your code into
that iframe page in their domain.

That won't work with your API key. They would have to get a key of their own
(or you would) for their domain.

Rossko's example loads the iframe SRC directly from *your* domain. Look at
the <iframe> tag:

<iframe height="600" width="800" src="http://diffent.com/map/demo9.html";
></iframe>

As you can see, the src attribute points to your HTML page. This is really
no different from loading your page directly in the browser:

http://diffent.com/map/demo9.html

and that's why it works. The secret sauce for making your API key work in
your customer's site is not "being in an IFRAME", it is "loading directly
into the browser from your domain". Whether that's in an IFRAME or as a
standalone page makes no difference.

-Mike

On Wed, Jul 14, 2010 at 11:47 AM, Rossko <ros...@culzean.clara.co.uk> wrote:

> > So I think I am going to have the users send their own map key to my
> > service and see if that works.  That throws a spanner into the
> > works...
>
> I wouldn't try to do that.  Just make them use an iframe properly ; it
> does work for other people.
>
> Here is your map working from a domain you've never heard of
> http://home.clara.net/culzean/gmap-iframe.htm
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API" group.
> To post to this group, send email to google-maps-...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api+unsubscr...@googlegroups.com<google-maps-api%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to google-maps-...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to