Commit 59f2bc05 by 林永鑫

ezapi升级

parent cc064b8b
...@@ -36,6 +36,43 @@ var ezMap = { ...@@ -36,6 +36,43 @@ var ezMap = {
// key: 'text' // key: 'text'
// }], // }],
//http://68.174.69.46:6081/arcgis/rest/services/founder/dg20191120/
[
"arcgis",
"http://68.174.69.45:6081/arcgis/rest/services/founder/dg20191120/MapServer/tile/{z}/{y}/{x}",
{
type: "xyz",
crs: "4326",
imageSRC: "../images/yingxiang.png",
tileGrid:{
tileSize: 256,
origin: [-180.0, 90.0],
resolutions: [
0.7031250000000001,
0.35156250000000006,
0.17578125000000003,
0.08789062500000001,
0.04394531250000001,
0.021972656250000003,
0.010986328125000002,
0.005493164062500001,
0.0027465820312500004,
0.0013732910156250002,
0.0006866455078125001,
0.00034332275390625005,
0.00017166137695312503,
0.00008583068847656251,
0.000042915344238281264,
0.0000214576721191406,
0.0000107288360595703,
0.00000536441802978516,
0.00000268220901485,
0.000001341104507425,
6.705522537124998e-7]
}
}
],
[ [
"yxtdt", "yxtdt",
"http://172.18.71.238:8088/EzServer7/WMTS?SERVICE=WMTS", "http://172.18.71.238:8088/EzServer7/WMTS?SERVICE=WMTS",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -57,7 +57,6 @@ const routes = [ ...@@ -57,7 +57,6 @@ const routes = [
]; ];
const router = new VueRouter({ const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL, base: process.env.BASE_URL,
routes routes
}); });
......
export function initViewer(map) { export function initViewer(map) {
window.map = new EzMap(map); window.map = new EzMap(map);
//此处代码是加载arcgisserver 地图服务的代码 //此处代码是加载arcgisserver 地图服务的代码
var mapUrl = // var mapUrl =
"http://68.174.69.45:6081/arcgis/rest/services/founder/dg20191120/MapServer/tile/{z}/{y}/{x}"; // "http://68.174.69.45:6081/arcgis/rest/services/founder/dg20191120/MapServer/tile/{z}/{y}/{x}";
var tileGrids = new ol.tilegrid.TileGrid({ // var tileGrids = new ol.tilegrid.TileGrid({
tileSize: 256, // tileSize: 256,
origin: [-180.0, 90.0], // origin: [-180.0, 90.0],
resolutions: [ // resolutions: [
0.7031250000000001, // 0.7031250000000001,
0.35156250000000006, // 0.35156250000000006,
0.17578125000000003, // 0.17578125000000003,
0.08789062500000001, // 0.08789062500000001,
0.04394531250000001, // 0.04394531250000001,
0.021972656250000003, // 0.021972656250000003,
0.010986328125000002, // 0.010986328125000002,
0.005493164062500001, // 0.005493164062500001,
0.0027465820312500004, // 0.0027465820312500004,
0.0013732910156250002, // 0.0013732910156250002,
0.0006866455078125001, // 0.0006866455078125001,
0.00034332275390625005, // 0.00034332275390625005,
0.00017166137695312503, // 0.00017166137695312503,
0.00008583068847656251, // 0.00008583068847656251,
0.000042915344238281264, // 0.000042915344238281264,
0.0000214576721191406, // 0.0000214576721191406,
0.0000107288360595703, // 0.0000107288360595703,
0.00000536441802978516, // 0.00000536441802978516,
0.00000268220901485, // 0.00000268220901485,
0.000001341104507425, // 0.000001341104507425,
6.705522537124998e-7 // 6.705522537124998e-7
] // ]
}); // });
var newLyr = new EzTileLayerXYZ("lyr", mapUrl, { // var newLyr = new EzTileLayerXYZ("lyr", mapUrl, {
projection: "EPSG:4326", // projection: "EPSG:4326",
tileSize: 256, // tileSize: 256,
tileGrid: tileGrids, // tileGrid: tileGrids,
crossOrigin: "anonymous" // crossOrigin: "anonymous"
}); // });
window.map.addLayer(newLyr); // window.map.addLayer(newLyr);
var coord = new EzCoord("116.403694", "39.91095"); var coord = new EzCoord("116.403694", "39.91095");
window.map.centerAndZoom(coord, 12); window.map.centerAndZoom(coord, 12);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment