OpenLayers + Proj4rs

Image Reprojection

This example shows client-side reprojection of single image source. This demo is the same as the OpenLayers one but here, it uses the proj4rs library instead of the proj4js one.

            

proj4 OpenLayers

import Map from 'ol/Map.js'; import OSM from 'ol/source/OSM.js'; import Static from 'ol/source/ImageStatic.js'; import View from 'ol/View.js'; import proj4 from 'proj4'; import {Image as, Tile as TileLayer} from 'ol/layer.js'; import {getCenter} from 'ol/extent.js'; import {register} from 'ol/proj/proj4.js'; import {transform} from 'ol/proj.js'; ...
            

proj4rs

import Map from 'ol/Map.js'; import OSM from 'ol/source/OSM.js'; import Static from 'ol/source/ImageStatic.js'; import View from 'ol/View.js'; import {proj4} from 'proj4rs/proj4.js'; import {Image as, Tile as TileLayer} from 'ol/layer.js'; import {getCenter} from 'ol/extent.js'; import {register} from 'ol/proj/proj4.js'; import {transform} from 'ol/proj.js'; ...