I have a web application which doesn't connect to the internet. The application uses gwt-openlayers to display WMS layers and points on it. The users can define WMS layers on the UI interface by adding the url, the layer, and the projection code. The openlayers documentation says:
And here comes the problem. The users can register wms layers with any kind of projection code. So for example if he has a wms service which provides layers with projection EPSG:31467 than he can't use it in my application because my proj4js doesn't know the definition of EPSG:31467
What's the best solution in this situation? Is there a way to include all the possible projection definitions to my html page?
أكثر...
By default, OpenLayers ships with the ability to transform coordinates between geographic (EPSG:4326) and web or spherical mercator (EPSG:900913 et al.) coordinate reference systems. Additional transforms may be added by using the proj4js library. If the proj4js library is included, the transform method will work between any two coordinate reference systems with proj4js definitions.
I tried the proj4js. I had a map with projection code 21781. I inserted to my html page the necessary projection definition from http://spatialreference.org/ref/epsg/21781/proj4js/ and it worked.
And here comes the problem. The users can register wms layers with any kind of projection code. So for example if he has a wms service which provides layers with projection EPSG:31467 than he can't use it in my application because my proj4js doesn't know the definition of EPSG:31467
What's the best solution in this situation? Is there a way to include all the possible projection definitions to my html page?
أكثر...