ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
682 stars 230 forks source link

custom map projection demo #447

Closed ghansham closed 2 years ago

ghansham commented 2 years ago

R/Sir

import proj4 from "proj4"; //import { get as getProjection } from "ol/proj"; import { register as registerProjection } from "ol/proj/proj4";

proj4.defs( "EPSG:997106", "+proj=geos +sweep=x +lon_0=82.5 +h=35786023 +x_0=0 +y_0=0 +datum=wgs84 +ellps=wgs84 +units=m +no_defs" ); registerProjection(proj4);

This code is not working in vuelayers application.

openlayers example is given below: https://openlayers.org/en/latest/examples/reprojection.html

regards Ghansham

0xMDIV commented 2 years ago

this works for me:

// https://www.npmjs.com/package/proj4 aka PROJ4 import proj4 from 'PROJ4'; import {register} from "ol/proj/proj4";

proj4.defs(['','']); register(proj4);

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.