How can I use Mapnik-Backgroundlayer with Latin layers on the same map as OpenLayers?

I have a map client application using OpenLayers . I want to use Mapnik data as a background layer, as provided by the OpenLayers.Layer.OSM.Mapnik class. To do this, I need to go to the projection EPSG: 900913. But I also want to display some layers that I can only request in EPSG: 4326. Can I combine both layers with different projections on the same map using OpenLayers and how can I do this?

+4
source share
1 answer

If your layers are vector (WFS, KML, GeoRSS, etc.), you can reprogram them using OpenLayers in a browser.

http://docs.openlayers.org/library/spherical_mercator.html#working-with-projected-coordinates

If your layers are raster (images / WMS, etc.), they cannot be reprogrammed:

http://docs.openlayers.org/library/spherical_mercator.html#creating-spherical-mercator-raster-images

You will need to do this through the WMS service itself (via MapServer / ArcGIS / GeoServer).

+3
source

Source: https://habr.com/ru/post/1300170/


All Articles