[cvs] [Wiki] created: HordeMap

Michael Rubinsky mrubinsk at horde.org
Sat Jun 26 18:57:26 UTC 2010


mrubinsk  Sat, 26 Jun 2010 14:57:25 -0400

Created page: http://wiki.horde.org/HordeMap

[[toc]]

+ HordeMap

Provides a javascript api for interacting with ajax "slippy" maps.

++ Bugs

http://bugs.horde.org/ticket/9042
http://bugs.horde.org/ticket/9044
http://bugs.horde.org/ticket/9111

++ People

[MichaelRubinsky Michael Rubinsky]

++ Description

Abstraction for in-line map support. Horde ships with a driver for  
[http://openlayers.org OpenLayers] which provides support for Google,  
Yahoo, Bing, and !OpenStreetMaps out of the box. Other mapping  
providers can be added by either adding the support the existing  
!OpenLayers driver or by writing a new custom map driver.


+++ Building !OpenLayers for Horde

Due to the extremely large "single file build" file that is provided  
by !OpenLayers, we build a custom version of the file, and split out  
other parts of it into our own classes. This takes the size of the  
file from somewhere around 3MB to slightly less the 1MB uncompressed  
(around 280k compressed).  This section is meant as an overview of how  
to build this Horde specific file.

* Download the full OL distribution
* While not necessary, I usually edit the //lib/!OpenLayers.js// file  
before I run the build to remove all code to check if we are in a  
single file build or not. This is not necessary since we know we are  
always a single file build, and it shaves a good bit of code off.
* Create a custom build cfg file. The file used to build the current  
file distributed in Horde is attached.
* Build the file by executing the //build.py// file in the openlayers  
build directory. Copy the resulting !OpenLayers.js file to the  
hordemap directory.
* Next we deal with the commercial mapping layers. Take the *full*  
contents of the //!OpenLayers/Layer/{mapprovider}.js// files that you  
want to support, and add append it to the  
//hordemap/{mapprovider}.js// file, replacing the existing openlayer  
code already in that file. For example - take the contents of  
//!OpenLayers/Layer/Google.js// and append it to the end of  
//hordemap/google.js// being sure to replace the exising openlayer  
code. This is all the code outside of the !HordeMap.Google and  
!HordeMap.Geocoder.Google classes.
* Language files. This is probably the section with the most work.  
Since openlayers does not maintain any consistency in the style of  
locale naming, we have to edit almost every language file. !Openlayers  
sometimes names locales like EN_US, and sometimes like EN-US and  
sometimes just like EN. First, copy all the language files (except the  
en.js file - that should be built in the openlayers.js file) to the  
//hordemap/lang// directory. They should *all* be named in the  
de_DE.js format.  Next, you have to open each file and rename the key  
into the Lang array to match the filename.

+++ How to use

TODO

++ Resources

http://openlayers.org

----
Back to the ((Projects|Project List))



More information about the cvs mailing list