Hi Matthew and others-
Sorry for the delay in responding. This is what we do in the API:
- We use LoaderInfo.parameters to set various Map properties, which returns
back name/value pairs of anything sent into the flashVars *or* the SWF URL.
- The current Map properties that are set are:
 "key", "client", "channel", "sensor", "language", "countryCode",
"languages", "version"
  So you can consider those reserved keywords.

Going forward, we'll find a place to document these parameters so that you
don't use them yourself.

- pamela


On Sat, Oct 25, 2008 at 6:28 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>wrote:

>
> rachke1,
>
> One thing I have noticed as of today is if you include certain other
> GET parameters in the url pointing to your swf, such as:
>
> http://ikon-pro.konsole.net:8080/mapstest/GoogleMapsTest.swf?someparam=test
>
> Your maps will break... How dumb is this?  Lets investigate:
>
> So I've ran some tests and provided the ServiceCapture request
> information below:
>
> 1) I provide no key in my flex code, which requires that it be
> specified in the URL as a GET parameter.  If I load my swf without
> specifying the key as a GET parameter, the maps do not load, stating:
> Initialization Failed, Please specify an API key...
>
> ServiceCapture shows this in the request:
>
> URL:
> http://ikon-pro.konsole.net/mapstest/GoogleMapsTest.swf
>
> ServiceCapture shows:
> GET /mapstest/GoogleMapsTest.swf HTTP/1.1
>
> Apparently, no call is even made to googles API key checking service
> (according to ServiceCapture no request is made to maps.googleapis.com/
> mapsapi/publicapi <http://maps.googleapis.com/mapsapi/publicapi>) ?  I am
> not sure how this is possible given that we
> see a message from google indicating that no key was provided.
>
>
> 2) I include a key as a GET parameter.  The maps load fine and
> ServiceCapture shows a successful request to googles API key checking
> service:
>
> URL:
> http://ikon-pro.konsole.net/mapstest/GoogleMapsTest.swf?key=MY_SITE_KEY
>
> ServiceCapture Request:
> GET /mapsapi/publicapi?file=flashapi&url=http%3A%2F%2Fikon-
> pro.konsole.net%2Fmapstest%2FGoogleMapsTest.swf%3Fkey%3DMY SITE
> KEY&key=MY_SITE_KEY&v=1.7 HTTP/1.1
>
> From this I conclude that the google flash api takes user specified
> parameters passed in the URL:
> GoogleMapsTest.swf%3Fkey%3DMY SITE KEY
>
> Then constructs a validation parameter set, appending its own further
> required params:
> &key=MY_SITE_KEY&v=1.7
>
> And passes the whole string for validation:
> GoogleMapsTest.swf%3Fkey%3DMY SITE KEY&key=MY_SITE_KEY&v=1.7
>
>
> 3) So I test this by adding both a key parameter and my own parameter:
>
> URL:
> GET /mapstest/GoogleMapsTest.swf?
>
> someparam=test&key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA
> HTTP/1.1
>
> ServiceCapture Request shows:
> GET /mapsapi/publicapi?file=flashapi&url=http%3A%2F%2Fikon-
> pro.konsole.net%2Fmapstest%2FGoogleMapsTest.swf%3Fsomeparam%3Dtest
> %26key
>
> %3DABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&v=1.7
> HTTP/1.1
>
> So some surprises here... notably that the additional parameter that I
> tested with (someparam=test or GoogleMapsTest.swf%3Fsomeparam%3Dtest)
> did NOT get included in the appended request to the validation routine
>
> (&key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&v=1.7).
> This is good.
>
>
> 4) So now I test using the additional parameter that my real
> application is to use (client=test)
>
> URL:
>
> http://ikon-pro.konsole.net/mapstest/GoogleMapsTest.swf?client=test&key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA
>
> ServiceCapture Request shows:
> GET /mapsapi/publicapi?file=flashapi&url=http%3A%2F%2Fikon-
> pro.konsole.net%2Fmapstest%2FGoogleMapsTest.swf%3Fclient%3Dtest%26key
>
> %3DABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&client=test&v=1.7
> HTTP/
>
> Again, this surprised me because the additional parameter named
> 'client' (GoogleMapsTest.swf%3Fclient%3Dtest) caused maps to break.
> We see in the service capture output above that this particular
> parameter DOES get included in the appended parameters that are used
> to validate the API key:
>
>
> key=ABQIAAAAbKWTxWWmuSsChdh06caoVRQLjNZSQa9WVil0eQ566selu5bxSRQW5edanTVpXaOGM3ewlCr-35uiNA&client=test&v=1.7
> (note client=test is included here, where as someparam=test in our
> previous example was not).
>
>
> Conclusion:
>
> There are reserved parameter keywords used by the google api.  If you
> try to use any of these keywords as custom parameters in your own
> application, it will break your google maps API key validation
> routine, thus breaking your maps.
>
> Regards,
> Matthew
>
>
> On Oct 22, 8:30 am, rachke1 <[EMAIL PROTECTED]> wrote:
> > Hi:
> >
> > I have developed an application with Flex Builder 3.
> > On my PC locally it works perfect.
> > When I deploy it on tomcat WebServer I get:
> > Please Check the API key
> > and network availability.
> > I do have a crossdmomain.xml file on the server.
> > Checked the Api Google Key, its OK.
> >
> > I know that this server is OK because I do connect with the
> > HTTPService component from a local Flex application, something is
> > missing for Google Maps only.
> >
> > What am I missing?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to