[OpenLayers-Dev] [OpenLayers-Users] Advice about Google layer limitations

Adrian Popa adrian_gh.popa at romtelecom.ro
Mon Nov 30 01:50:10 EST 2009


Thank you Andreas for the info. I will try to load the map once the 
browser is resized to the original dimension and tell you if there is a 
difference.

One more question - if the patch or workaround don't work - do you think 
it's possible to limit the bbox to just the visible area of the map 
(without extra margins?). I would like to do this either for the Google 
Layer, or for all the layers - to reduce general load on the server.

Thank you,
Adrian

Andreas Hocevar wrote:
> Adrian Popa wrote:
>> I asked the same question on Google API forums, and it looks like the 
>> original Google API doesn't have this limitation.
>>   
>
> OpenLayers uses the original Google API, v2.x. Using 
> OpenLayers.Layer.Google is nothing else than using a GMaps Map 
> directly, you just access it wrapped by an OpenLayers layer type, not 
> by the API directly.
>
> I also do not see a violation of the terms of use. We even make sure 
> that the Terms of Use link is clickable if we render other layers on 
> top of Google.
>
> There is, however, a known issue: if you create your map at a smaller 
> size and switch from one Google Layer type to another after resizing 
> it to your big map, tiles will only be loaded for the area of the old 
> extent. There is a patch that appears to solve this issue. You can try 
> it: http://trac.openlayers.org/ticket/1797
>
> Regards,
> Andreas.
>
>> I did some tests and you can see the results on this thread: 
>> http://groups.google.com/group/google-maps-api/browse_thread/thread/97d62ed9a85e665e 
>>
>>
>> I would like to know if there is something that can be done from the 
>> OpenLayers side, or is this a known limitation. Is OpenLayers 
>> scraping images from Google, or is it using the API just like any 
>> other Google Maps client?
>>
>> Thank you,
>> Adrian
>>
>> Adrian Popa wrote:
>>  
>>> Hello everybody,
>>>
>>> I would  like to share with you my findings about the usage of 
>>> Google background on very large maps. I have to render a map with 
>>> the screen resolution of about 4500x3100 (on a wall of screens). It 
>>> works ok with WFS layers, OSM and even Microsoft Virtual Earth, but 
>>> I have issues with Google and Yahoo.
>>>
>>> When I switch to the google layer, the background turns gray and 
>>> then the browser starts loading the images. After about 130s of 
>>> loading (there are quite a lot of pictures), I notice that google 
>>> starts throwing back HTTP 403 errors (Resource temporary 
>>> unavailable). Just before seeing these errors, some images (the 
>>> center part of the map) start appearing, but only about 1/4 of the 
>>> map is drawn. If I wait about 5 minutes, the download process gives 
>>> up (it still receives HTTP 403 errors all this time), but it 
>>> displays the rest of the images - which were apparently downloaded 
>>> before the 403 error appeard.
>>>
>>> I'm thinking it manages to download most of the visible images + 
>>> some images in the bbox (which is quite large), but not all the 
>>> images before getting errors. The problem is the Google API doesn't 
>>> display what it downloaded, but waits for more images to be downloaded.
>>>
>>> After analysing the data, I noticed that when the first DNS query is 
>>> done for the Google cache, it receives back 4 IP addresses. However, 
>>> only the first 2 IPs are used for traffic - and these 2 IPs start 
>>> sending back HTTP 403 errors after a while.
>>>
>>> I would like to know if the following are possible:
>>> 1. configure the Google API to use all the IP addresses it receives 
>>> in the DNS query - maybe this avoids the 403 erros
>>> 2. configure the Google API to display the pictures received without 
>>> waiting for more pictures to download. I'm not sure if this is 
>>> possible - maybe the images are pipelined through the same 
>>> connection - and they are shown only when the connection closes.
>>> 3. reduce the bbox for the Google Layer - this should be fine for my 
>>> needs - and maybe avoids the 403 errors.
>>>
>>> With regard to the Yahoo layer - things are better. It loads faster 
>>> for the same size (they don't seem to have a "throttling" 
>>> mechanism), but it only displays the final image when all the bits 
>>> are downloaded - so it's as fast as the slowest image. Can this 
>>> behavoir be changed from within OpenLayers?
>>>
>>> Thanks,
>>> Adrian
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>       
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>   
>
>


-- 
--- 
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099




More information about the Dev mailing list