shuishen
2023-04-19 db0a69b68d60b74e5ec03fd70b7ba50290ae0f27
低分率影像
3 files modified
25 files added
185 ■■■■■ changed files
public/qp/11级切片.gm_source_def.xml 12 ●●●●● patch | view | raw | blame | history
public/qp/11级切片.htm 116 ●●●●● patch | view | raw | blame | history
public/qp/Z10/426/847.png patch | view | raw | blame | history
public/qp/Z10/426/848.png patch | view | raw | blame | history
public/qp/Z10/427/847.png patch | view | raw | blame | history
public/qp/Z10/427/848.png patch | view | raw | blame | history
public/qp/Z11/853/1695.png patch | view | raw | blame | history
public/qp/Z11/853/1696.png patch | view | raw | blame | history
public/qp/Z11/854/1694.png patch | view | raw | blame | history
public/qp/Z11/854/1695.png patch | view | raw | blame | history
public/qp/Z11/854/1696.png patch | view | raw | blame | history
public/qp/Z11/855/1694.png patch | view | raw | blame | history
public/qp/Z11/855/1695.png patch | view | raw | blame | history
public/qp/Z11/855/1696.png patch | view | raw | blame | history
public/qp/Z2/1/3.png patch | view | raw | blame | history
public/qp/Z4/6/13.png patch | view | raw | blame | history
public/qp/Z5/13/26.png patch | view | raw | blame | history
public/qp/Z6/26/52.png patch | view | raw | blame | history
public/qp/Z6/26/53.png patch | view | raw | blame | history
public/qp/Z7/53/105.png patch | view | raw | blame | history
public/qp/Z7/53/106.png patch | view | raw | blame | history
public/qp/Z8/106/211.png patch | view | raw | blame | history
public/qp/Z8/106/212.png patch | view | raw | blame | history
public/qp/Z9/213/423.png patch | view | raw | blame | history
public/qp/Z9/213/424.png patch | view | raw | blame | history
public/static/config.js 6 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 45 ●●●● patch | view | raw | blame | history
vue.config.js 6 ●●●● patch | view | raw | blame | history
public/qp/11级切片.gm_source_def.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<source_list version="1.0" creator="Global Mapper - http://www.globalmapper.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.globalmapper.com/OSL/1/0" xsi:schemaLocation="http://www.globalmapper.com/OSL/1/0 http://www.globalmapper.com/OSL/1/0/gmc.xsd">
<source type="GMAP">
  <name>My Map Set Name</name>
  <FileExt>png</FileExt>
  <LatLonBounds>90,0,180,66.5132604431</LatLonBounds>
  <NumZoomLevels>12</NumZoomLevels>
  <TileSize>256</TileSize>
  <BaseURL><![CDATA[file:///G:/%D0%C5%D6%DD%C7%F8%D5%FD%C9%E4%B3%C9%B9%FB%B4%E6%B5%B5/%C7%D0%C6%AC%B2%E2%CA%D4/11%BC%B6%C7%D0%C6%AC%C8%AB/Z%z/%y/%x.png]]></BaseURL>
  <NativeProj>EPSG:3857</NativeProj>
</source>
</source_list>
public/qp/11级切片.htm
New file
@@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>My Map Set Name (Google Maps Export from Global Mapper)</title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
    var G = google.maps;
    var map;
    var customMapType = new G.ImageMapType
      (
        {
        getTileUrl: function(coord, zoom)
          {
          var normalizedCoord = getNormalizedCoord(coord, zoom);
          if (!normalizedCoord) { return null; }
          if ( zoom == 1 && normalizedCoord.x >= 1 && normalizedCoord.x <= 1 && normalizedCoord.y >= 0 && normalizedCoord.y <= 0 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 2 && normalizedCoord.x >= 3 && normalizedCoord.x <= 3 && normalizedCoord.y >= 1 && normalizedCoord.y <= 1 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 3 && normalizedCoord.x >= 6 && normalizedCoord.x <= 7 && normalizedCoord.y >= 2 && normalizedCoord.y <= 4 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 4 && normalizedCoord.x >= 12 && normalizedCoord.x <= 15 && normalizedCoord.y >= 4 && normalizedCoord.y <= 8 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 5 && normalizedCoord.x >= 24 && normalizedCoord.x <= 31 && normalizedCoord.y >= 8 && normalizedCoord.y <= 16 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 6 && normalizedCoord.x >= 48 && normalizedCoord.x <= 63 && normalizedCoord.y >= 16 && normalizedCoord.y <= 32 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 7 && normalizedCoord.x >= 96 && normalizedCoord.x <= 127 && normalizedCoord.y >= 32 && normalizedCoord.y <= 64 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 8 && normalizedCoord.x >= 192 && normalizedCoord.x <= 255 && normalizedCoord.y >= 64 && normalizedCoord.y <= 128 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 9 && normalizedCoord.x >= 384 && normalizedCoord.x <= 511 && normalizedCoord.y >= 128 && normalizedCoord.y <= 256 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 10 && normalizedCoord.x >= 768 && normalizedCoord.x <= 1023 && normalizedCoord.y >= 256 && normalizedCoord.y <= 512 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          else if ( zoom == 11 && normalizedCoord.x >= 1536 && normalizedCoord.x <= 2047 && normalizedCoord.y >= 512 && normalizedCoord.y <= 1024 )
          {
            return "file:///G://ÐÅÖÝÇøÕýÉä³É¹û´æµµ//ÇÐÆ¬²âÊÔ//11¼¶ÇÐÆ¬È«//Z" + zoom + "/" + normalizedCoord.y + "/" + normalizedCoord.x + ".png"; // replace that with a "real" URL
          }
          return null;
        },
        alt: "My Map Set Name",
        tileSize: new G.Size(256, 256),
        isPng: true,
        maxZoom: 11,
        minZoom: 1,
        opacity: 1.00,
        name: "My Map Set Name"
      }
    )
    function getNormalizedCoord(coord, zoom)
    {
      var y = coord.y;
      var x = coord.x;
      var tileRange = 1 << zoom;
      if (y < 0 || y >= tileRange) { return null; }
      if (x < 0 || x >= tileRange)
      {
        x = (x % tileRange + tileRange) % tileRange;
      }
      return { x: x, y: y };
    }
    function initialize()
    {
      var myLatlng = new G.LatLng(33.256630,135.000000);
      var myOptions = {
        center: myLatlng,
        zoom: 1,
        mapTypeId: G.MapTypeId.ROADMAP,
        mapTypeControl: true,
        overviewMapControl: false,
        scaleControl: false,
        streetViewControl: true,
        panControl: true,
        zoomControl: true,
        zoomControlOptions: { style: google.maps.ZoomControlStyle.DEFAULT }
      };
      map = new G.Map(document.getElementById("map_canvas"), myOptions);
      map.overlayMapTypes.insertAt(0, customMapType);
    }
    </script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 100%; height: 800px; margin: 0px 0px 0px 0px; float: middle;"></div>
</body> </html>
public/qp/Z10/426/847.png
public/qp/Z10/426/848.png
public/qp/Z10/427/847.png
public/qp/Z10/427/848.png
public/qp/Z11/853/1695.png
public/qp/Z11/853/1696.png
public/qp/Z11/854/1694.png
public/qp/Z11/854/1695.png
public/qp/Z11/854/1696.png
public/qp/Z11/855/1694.png
public/qp/Z11/855/1695.png
public/qp/Z11/855/1696.png
public/qp/Z2/1/3.png
public/qp/Z4/6/13.png
public/qp/Z5/13/26.png
public/qp/Z6/26/52.png
public/qp/Z6/26/53.png
public/qp/Z7/53/105.png
public/qp/Z7/53/106.png
public/qp/Z8/106/211.png
public/qp/Z8/106/212.png
public/qp/Z9/213/423.png
public/qp/Z9/213/424.png
public/static/config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-02-21 14:16:56
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-18 14:21:13
 * @LastEditTime: 2023-04-19 10:41:50
 * @FilePath: \srs-police-affairs\public\static\config.js
 * @Description: 
 * 
@@ -45,7 +45,7 @@
    // 栅格地图的
    // VUE_APP_MAP_YX: 'http://10.141.11.11:80/ysapi',
    VUE_APP_MAP_YX: 'http://10.141.11.12:80/gj',
    VUE_APP_MAP_YX: 'http://10.141.11.11:80/gj',
    VUE_APP_MAP_SL: 'http://10.141.11.11:80/slapi',
    VUE_APP_MAP_DX: 'http://10.141.11.12:80/DEM',
    VUE_APP_MAP_DX: 'http://10.141.11.11:80/DEM',
}
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-18 19:31:36
 * @LastEditTime: 2023-04-19 14:15:07
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -293,21 +293,21 @@
            // global.viewer.addTerrain(terrain)
            // 内网
            // that.switchImg()
            that.switchImg()
            // 地形数据添加
            // that.addTerrain()
            that.addTerrain()
            // 外网
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=d083e4cf30bfc438ef93436c10c2c20a',
                    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
                    format: 'image/jpeg',
                    show: true,
                    maximumLevel: 18
                })
            )
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=d083e4cf30bfc438ef93436c10c2c20a',
            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            //         format: 'image/jpeg',
            //         show: true,
            //         maximumLevel: 18
            //     })
            // )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
@@ -686,6 +686,24 @@
            // layer.contrast = 0.8
            // baseLayers.push(layer)
            const qp = global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: `/qp/{AZ}/{y}/{x}.png`,
                    customTags: {
                        AZ (imageryProvider, x, y, level) {
                            return 'Z' + level
                        },
                    },
                    minimumLevel: 0,
                    maximumLevel: 25,
                })
            )
            qp.contrast = 0.8
            baseLayers.push(qp)
            yxLayerJson.forEach(item => {
                let rectangle = {}
@@ -1154,6 +1172,9 @@
            tilesetObject[titlesetName].setHeight(10)
            // 地形数据添加
            // tilesetObject[titlesetName].setHeight(-73)
            tilesetLayer.addOverlay(tilesetObject[titlesetName])
            // global.viewer.flyTo(tilesetObject[titlesetName])removeMxTileset
vue.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:37:07
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-12 16:21:17
 * @LastEditTime: 2023-04-19 12:04:13
 * @FilePath: \srs-police-affairs\vue.config.js
 * @Description:
 *
@@ -95,6 +95,10 @@
                    from: "./public/images",
                    to: "images",
                },
                {
                    from: "./public/qp",
                    to: "qp",
                },
            ],
        ])