Axis flipping in Open Layers

المشرف العام

Administrator
طاقم الإدارة
I have a map working using Leaflet as follows, using EPSG 2236 and a custom tilegrid. I want to switch to OpenLayers 3 so I can use the map rotation functionality but I am having trouble setting up the projection.

var bbox = [0, 5000000, 14747959, 19747959];var maxResolution = ( bbox[2]-bbox[0] )/256;var crs = L.CRS.proj4js('EPSG:2263' , '+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 ' + '+x_0=300000.0000000001 ' + '+y_0=0 ' + '+ellps=GRS80 ' + '+datum=NAD83 ' + '+to_meter=0.3048006096012192 ' + '+no_defs ', new L.Transformation(1,-bbox[0], -1, bbox[3])); crs.scale = function(zoom) { return 1 / (maxResolution / Math.pow(2, zoom)); };In particular, how can I replicate the flipping of the axis achieved using this?:

new L.Transformation(1,-bbox[0], -1, bbox[3])

أكثر...
 
أعلى