Skip to main content

I'm trying to convert coordinates from wgs84WGS84 to EPSG:3067 with proj4js and Openlayers, but can't get the conversion right. When I run proj4('EPSG:3067',[-24.9993393, -60.184716]); it gives [-2143537.623518457, -7831430.649243464]
When clicked on the map the point of coordinates it gives
[-2182546.021603215, -12759115.371540245] witchwhich is accurate if I put the center of the map to the clicked coordinates. BellowBelow is the code where the EPSG:3067 is defined.

proj4.defs("EPSG:3067", "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
extent = [-3670733.46, 4601971.85, 642319.78, 9362767.00];
ol.proj.get('EPSG:3067').setExtent(extent);

I'm trying to convert coordinates from wgs84 to EPSG:3067 with proj4js and Openlayers, but can't get the conversion right. When I run proj4('EPSG:3067',[-24.9993393, -60.184716]); it gives [-2143537.623518457, -7831430.649243464]
When clicked on the map the point of coordinates it gives
[-2182546.021603215, -12759115.371540245] witch is accurate if I put the center of the map to the clicked coordinates. Bellow is the code where the EPSG:3067 is defined.

proj4.defs("EPSG:3067", "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
extent = [-3670733.46, 4601971.85, 642319.78, 9362767.00];
ol.proj.get('EPSG:3067').setExtent(extent);

I'm trying to convert coordinates from WGS84 to EPSG:3067 with proj4js and Openlayers, but can't get the conversion right. When I run proj4('EPSG:3067',[-24.9993393, -60.184716]); it gives [-2143537.623518457, -7831430.649243464]
When clicked on the map the point of coordinates it gives
[-2182546.021603215, -12759115.371540245] which is accurate if I put the center of the map to the clicked coordinates. Below is the code where the EPSG:3067 is defined.

proj4.defs("EPSG:3067", "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
extent = [-3670733.46, 4601971.85, 642319.78, 9362767.00];
ol.proj.get('EPSG:3067').setExtent(extent);
edited tags
Link
Chris W
  • 15.8k
  • 2
  • 29
  • 47
Source Link

WGS84 conversion to EPSG:3067

I'm trying to convert coordinates from wgs84 to EPSG:3067 with proj4js and Openlayers, but can't get the conversion right. When I run proj4('EPSG:3067',[-24.9993393, -60.184716]); it gives [-2143537.623518457, -7831430.649243464]
When clicked on the map the point of coordinates it gives
[-2182546.021603215, -12759115.371540245] witch is accurate if I put the center of the map to the clicked coordinates. Bellow is the code where the EPSG:3067 is defined.

proj4.defs("EPSG:3067", "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
extent = [-3670733.46, 4601971.85, 642319.78, 9362767.00];
ol.proj.get('EPSG:3067').setExtent(extent);