Skip to end of metadata
Go to start of metadata

From Mapbuilder 1.5rc1 on, the new Proj4js library is used for projecting maps and features.

Projections will be downloaded dynamically from spatialreference.org, if not found locally. This will only work if a working proxy is configured. If the used projections for a mapping application are known at deployment time, the projection definitions can be included in a JavaScript block in the head of the main page, after the script tag that includes Mapbuilder.js (MapbuilderCompressed.js). The code to include can be directly pasted from the Proj4js output of spatialreference.org, e.g.

 http://spatialreference.org/ref/epsg/31258/proj4js/

will return the following valid javascript code:

Replace "31258" in the above url with your EPSG code. 

Prior to Mapbuilder 1.5rc1

This is information started from an email from Mike Adair:

Projection support in mapbuilder is a direct port of the Proj4 C library to
Javascript and we do plan to split this out into it's own Open Source
project. The way it works is (and my explanation is probably not very
rigorous as I'm not really an expert on this stuff):

Projections generally belong to a class like Lambert Conformal Conic (LCC),
Polar Stereographic (PS), Universal Transverse Mercator (UTM), etc. These
define the mathematical equations that are used to go from a
latitude/longitude coordinate system to projected map and it is these
equations that are implemented in the Proj.js library. Specific instances
of these classes are identified by their EPSG codes (and eventually by CRS
definitions) and will have specific initialization parameters for that class
of projection (eg. Standard parallels, earth ellipsoids and datums)

So to support a new projection, what is required is to implement the
equations in JavaScript (convert the Proj4 code) and set up the
initialization parameters with WKT from the EPSG database. (I hope to
convert this to a web service lookup for unknown EPSG codes and CRS URNs,
eventually).

 Our intent is to factor out projection code into a seperate library.  This has already started and is discussed on the mapbuilder-proj@lists.sourceforge.net email list.  This list is also a good place for advice on how to add a new projection.

  • No labels