Hi there,
as the Openlayers JS file is pretty big I am wondering what the best strategy is to deal with that.
Using the hosted version might have the advantage, that the Browser might already have this file in its cache, if the user has already visited another site, which includes it from the same place. One disadvantage of using the hosted file probably is that the server is probably not as fast as it could be?
Using a local version one could compress the file, I have read. But, isn't it compressed already? Which ways could it be further optimzed?
And last not least - how big is the OpenLayers Lib in comparison to lets say Google Maps? Are there big differences, or is it more or less the same for every mapping library?
I hope someone has already had similar concerns and can share her thoughts..
Thanks,
Walter
Comments
Comment #1
tmcw commentedUse a local version if at all possible. The openlayers.org server is slow and unreliable.
By removing the parts of the library you don't use. See OpenLayerer
OpenLayers is much larger than Google Maps, and than most other mapping libraries, due to years of code additions and overly verbose coding technique.
Comment #2
zzolo commentedClosing. Ask more questions if needed.
Comment #3
Patroclas commentedI have been attempting to reduce the size of a locally hosted OL library with OpenLayerer but cannot get anything but the full version to work.
Is there any guidance available for the essential elements for an OL Drupal install?
I am using OL to render layers created from kml files with Google maps.
Thanks
Comment #4
tom_o_t commentedCan you add some more detail about what doesn't work when you try to reduce the size?
Comment #5
Patroclas commentedI have another issue at http://drupal.org/node/1358290 which supercedes this - will come back to this when that is solved.