Add and use new proj4.register function
This commit is contained in:
@@ -21,15 +21,14 @@
|
||||
* for the required projections. These definitions can be obtained from
|
||||
* {@link https://epsg.io/}, and are a JS function, so can be loaded in a script
|
||||
* tag (as in the examples) or pasted into your application.
|
||||
* The first time there is a request for a projection, either with a
|
||||
* {@link ol.proj.projectionLike} or directly with {@link ol.proj.get}, the
|
||||
* code will check if the Proj4js library and the necessary definition are
|
||||
* loaded; if so, it will register the appropriate {@link ol.proj.Projection}
|
||||
* object and add transform functions between the new projection and all the
|
||||
* existing ones. See examples/wms-image-custom-proj for an example of this.
|
||||
* Because the check for presence of the Proj4js library and the definition only
|
||||
* takes place on the first request for them, this means they can be loaded
|
||||
* dynamically as needed; for example, with user-supplied data where you don't
|
||||
*
|
||||
* After all required projection definitions are added to proj4's registry (by
|
||||
* using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`
|
||||
* package. Existing transforms are not changed by this function. See
|
||||
* examples/wms-image-custom-proj for an example of this.
|
||||
*
|
||||
* Additional projection definitions can be registered with `proj4.defs()` any
|
||||
* time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't
|
||||
* know in advance what projections are needed, you can initially load minimal
|
||||
* support and then load whichever are requested.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user