I'm working on a map viewer project and used openlayers 2 before this. Now I have to use OpenLayers 3 and map viewer app should support many different projections because I have wms and wfs layers from different sources and projections. I've found examples that use openlayers2 and proj4js. But I couldn't find explicit example for using ol3 and proj4js. What is your suggestion?
相关问题
- gis calculate distance between point and polygon /
- No such property: geometry when updating feature i
- When calcuating distance between points on earth w
- Display layers at certain zoom levels in R Leaflet
- 'module' object has no attribute 'OSMG
相关文章
- Mapping just one State of India and writing its na
- 在Arcengine开发中进行重分类时,程序自动退出,
- 如何通过编程将自定义图形信息写入到ttf字体格式文件中。
- getFeatures() is empty
- How to use both Ext 3 and Ext 4 togeheter with Geo
- Matching / Joining SpatialPoints with SpatialLines
- How to extract interior polygon coordinates using
- Creating a polygon around a linestring with PostGI
It seems that sometimes, like when using OpenLayers 3 and proj4 in Angular 2 using webpack, one needs to explicitly tell OL3 where to find it:
When all is fine, then after defining a projection,
ol.proj.get
should return it:This example demonstrates how to use proj4js with ol3: http://openlayers.org/en/v3.3.0/examples/wms-image-custom-proj.html
Basically using proj4js in OpenLayers 3 works transparently. You need to throw the srs definition at proj4js first, and then you can use the projection right away: