On Apr 23, 10:54 pm, "Maps.Huge.Info (Google Maps API Guru)" <cor...@gmail.com> wrote:
> I don't see it trying to load, so (unknown to me) there must be some > sort of restriction for either GGroundOverlay or JavaScript in general > from loading a local file as an image. You might want to search the > web for that issue with JavaScript in general. It's deeper than that, actually; it appears to be a general browser restriction, though not one I knew about before. I made a little test page: <html> <head> </head> <body> <img src="file:///C:/Data/iPhone-Verification/Final/30MIN/ N39W104E7_30.jpg" /> </body> </html> and it didn't work either. So it's not even anything to do with JavaScript. Further testing revealed the following pattern: Works: http://domain1 loading img from http://domain2 Works: file:///path loading img from http://domain Works: file:///path loading img from file:///path Doesn't work: http://domain loading img from file:///path So it's also not just a consequence of the Same Origin Policy, or the first three cases wouldn't work either. [Note: Case 1 is the age-old problem of image hotlinking.] I'm guessing that perhaps there's a non- obvious security issue, or something along those lines, but that's only a guess. Because it's a browser problem generally, not a Maps API or JS one, there probably isn't going to be a workaround for it. IOW, whatever you do in the API, you'll run into this wall eventually if you're trying to reference a local image. One question: have you tried this on an actual iPhone? There's an outside chance that that particular browser doesn't implement this restriction. Otherwise, my best suggestion is to use a tile overlay instead, which could significantly reduce the download size. String --~--~---------~--~----~------------~-------~--~----~ 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-API@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 -~----------~----~----~----~------~----~------~--~---