Selaa lähdekoodia

本地坐标终于和gis坐标对准了。

xushiting 4 vuotta sitten
vanhempi
commit
cfd63215d1
1 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 12 10
      IndoorViewerAPI.js

+ 12 - 10
IndoorViewerAPI.js

@@ -123082,20 +123082,22 @@ and limitations under the License.
     });
     var i = n(1669);
     e.proj4Factory = i.default,
-    e.proj4Factory.defs("EPSG:31468", "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs");
+    //e.proj4Factory.defs("EPSG:31468", "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs");
+    //e.proj4Factory.defs("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
+    e.proj4Factory.defs("EPSG:99999", "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80  +units=m +no_defs");
     var r = function() {
         function t(t) {
             this.proj4Transformer = t
         }
         return t.prototype.forward = function(t) {
+            // var e = this.proj4Transformer.forward(t);
+            // return t.x = e.x,
+            // t.y = e.y,
+            // t
+            
             var e = this.proj4Transformer.forward(t);
-            return t.x = e.x,
-            t.y = e.y,
-            t
-            /*
-            var e = this.proj4Transformer.forward(t);
-            console.log('t-x:'+t.x+',t-y'+t.y);
-            if(t.x == 113.59571152939596 || t.y == 22.366594630499026 ){
+            //console.log('t-x:'+t.x+',t-y'+t.y);
+            if(t.x == 113.59500383333348 || t.y == 22.367328805555548 ){
                 console.log('okokokokokokokok1');
                 //t.x = -0.3665;
                 //t.y = -3.3755;
@@ -123103,7 +123105,7 @@ and limitations under the License.
                 t.y = 0;
                 t.z = 0;   //0.43665
             }
-            else if(t.x == 113.595707287329 || t.y == 22.366616648951815){
+            else if(t.x == 113.59499965011267 || t.y == 22.367350833518422){
                 console.log('okokokokokokokok2:'+t.z);
                 //t.x = -0.4656740128993988;
                 //t.y = 2.6516430377960205;
@@ -123123,7 +123125,7 @@ and limitations under the License.
                 t.y = e.y;
             }
             return t;
-            */
+            
         }
         ,
         t.prototype.inverse = function(t) {