当前位置: 首页 > news >正文

服务器建站贵阳网络推广排名

服务器建站,贵阳网络推广排名,喀什网站建设,基于asp的网站设计与实现1.背景 最近在做天地图的项目,要基于MapBox添加CGCS2000矢量切片数据,但是 Mapbox 只支持web 墨卡托(3857)坐标系的数据。Github有专业用户修改了mapbox-gl的相关代码,支持CGCS2000的切片数据加载,并且修改…

1.背景

最近在做天地图的项目,要基于MapBox添加CGCS2000矢量切片数据,但是 Mapbox 只支持web 墨卡托(3857)坐标系的数据。Github有专业用户修改了mapbox-gl的相关代码,支持CGCS2000的切片数据加载,并且修改了相关的mapbox-gl的配套代码,详情请见github网址。https://github.com/cgcs2000

2.将MapBox部署到本地

npm i @cgcs2000/mapbox-gl
<!DOCTYPE html>
<html><head><meta charset='utf-8' /><title>Mapbox加载天地图CGCS2000矢量瓦片地图服务</title><meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /><style>body {margin: 0;padding: 0;}#map {position: absolute;top: 0;bottom: 0;width: 100%;}</style>
</head><body><div id='map'></div>
</body>
<script type="module">
import '@cgcs2000/mapbox-gl/dist/mapbox-gl.css'
import mapboxgl from '@cgcs2000/mapbox-gl';mapboxgl.accessToken = 'YourToken';
//添加天地图
var mapStyle = {"version": 8,"name": "Map","sources": {"world-vec": {"type": "raster","tiles": ["http://t0.tianditu.gov.cn/vec_c/wmts?tk=......"],"scheme": "xyz","maxzoom": 9,"tileSize": 256},"layers": [{"id": "world-vec","source": "world-vec","type": "raster","layout": {"visibility": "visible"}},],"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf","transition": {"duration": 300,"delay": 0}
}var map = new mapboxgl.Map({container: 'map',zoom: 7,center: [118.8, 36.3],style: mapStyle,
});/**CGCS2000投影坐标系(4490)**/
map.on('load', function loaded() {//添加geoserver矢量切片map.addSource('custom-go-vector-tile-source', {type: 'vector',scheme: 'tms',tiles: ['http://localhost:8080/geoserver/gwc/service/tms/1.0.0/MyWork%3Acounty@EPSG%3A4490@pbf/{z}/{x}/{y}.pbf'], //GeoServer发布的矢量切片地图zoomOffset: -1});//配置矢量切片图层样式map.addLayer({"id": "custom-go-vector-tile-layer","type": "circle",       // 符号化样式 [fill,line,symbol,circle,heatmap]"source": "custom-go-vector-tile-source","source-layer": "county",  //添加矢量图层名"minzoom": 5,"maxzoom": 13,paint: {'circle-radius': 1,'circle-color': "#000000",'circle-opacity': 0.8}});});</script>
</html>

3.GeoServer发布CGCS2000的矢量瓦片服务

1.安装过程自行百度,Tomcat下面部署Geoserver可能会遇到跨域访问问题。将geoserver部署到tomcat之后,打开tomcat下webapps\geoserver\WEB-INF目录下的web.xml文件,添加一下内容,重启tomcat即可。

    <filter><filter-name>CORS</filter-name> <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class><init-param> <param-name>cors.tagRequests</param-name> <param-value>true</param-value> </init-param></filter><filter-mapping> <filter-name>CORS</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

2.发布矢量瓦片服务
GeoServer默认只有84的坐标系,我们需要自己定义CGCS2000的坐标系。
首先,点击Tile Caching下的Gridsets,创建一个新的坐标系
在这里插入图片描述
在框选的地方搜索4490,选择为CGCS2000坐标系,其他数据按图填写(279,541,132.0143589),级别自定义。
在这里插入图片描述
设置完成后在矢量切片设置页,将新设置坐标系添加进来
在这里插入图片描述
在TMS页就可以看到服务地址
在这里插入图片描述

4.效果展示

在这里插入图片描述


文章转载自:
http://dottie.xhqr.cn
http://tokology.xhqr.cn
http://erivan.xhqr.cn
http://couturier.xhqr.cn
http://bolide.xhqr.cn
http://hemiopia.xhqr.cn
http://homostyly.xhqr.cn
http://opuscule.xhqr.cn
http://cinchonidine.xhqr.cn
http://broccoli.xhqr.cn
http://thrasher.xhqr.cn
http://raisonne.xhqr.cn
http://oxytocia.xhqr.cn
http://mortadella.xhqr.cn
http://disinvitation.xhqr.cn
http://slovenry.xhqr.cn
http://antichrist.xhqr.cn
http://recession.xhqr.cn
http://tropaeolin.xhqr.cn
http://ridgling.xhqr.cn
http://gunsmith.xhqr.cn
http://hairstylist.xhqr.cn
http://nonallelic.xhqr.cn
http://lacquerware.xhqr.cn
http://crochet.xhqr.cn
http://cowtail.xhqr.cn
http://leeway.xhqr.cn
http://emplane.xhqr.cn
http://wordily.xhqr.cn
http://recoil.xhqr.cn
http://setiparous.xhqr.cn
http://costarica.xhqr.cn
http://painfully.xhqr.cn
http://tyrannize.xhqr.cn
http://crabbily.xhqr.cn
http://gangling.xhqr.cn
http://myoid.xhqr.cn
http://actinic.xhqr.cn
http://reconvert.xhqr.cn
http://ligule.xhqr.cn
http://bleed.xhqr.cn
http://fellowlike.xhqr.cn
http://luteofulvous.xhqr.cn
http://strategic.xhqr.cn
http://microalloy.xhqr.cn
http://gyronny.xhqr.cn
http://childless.xhqr.cn
http://counterpressure.xhqr.cn
http://formulable.xhqr.cn
http://arrange.xhqr.cn
http://futurism.xhqr.cn
http://swimgloat.xhqr.cn
http://pushcart.xhqr.cn
http://gaminerie.xhqr.cn
http://londoner.xhqr.cn
http://histie.xhqr.cn
http://ectogenous.xhqr.cn
http://nonpartizan.xhqr.cn
http://funchal.xhqr.cn
http://subgenital.xhqr.cn
http://creamware.xhqr.cn
http://ail.xhqr.cn
http://surlily.xhqr.cn
http://cadmium.xhqr.cn
http://turnabout.xhqr.cn
http://adeni.xhqr.cn
http://wheezy.xhqr.cn
http://acetamide.xhqr.cn
http://paralytic.xhqr.cn
http://jayhawk.xhqr.cn
http://lousiness.xhqr.cn
http://yard.xhqr.cn
http://conceivably.xhqr.cn
http://such.xhqr.cn
http://inhale.xhqr.cn
http://gellant.xhqr.cn
http://chucklehead.xhqr.cn
http://frostbitten.xhqr.cn
http://titubation.xhqr.cn
http://bigeminal.xhqr.cn
http://sheepherding.xhqr.cn
http://isogeotherm.xhqr.cn
http://turd.xhqr.cn
http://weakness.xhqr.cn
http://gilding.xhqr.cn
http://pediococcus.xhqr.cn
http://maternal.xhqr.cn
http://dermatoid.xhqr.cn
http://hpgc.xhqr.cn
http://identifiably.xhqr.cn
http://godless.xhqr.cn
http://barrathea.xhqr.cn
http://unhysterical.xhqr.cn
http://misline.xhqr.cn
http://octandrious.xhqr.cn
http://emptier.xhqr.cn
http://eaten.xhqr.cn
http://shearwater.xhqr.cn
http://yeanling.xhqr.cn
http://protuberate.xhqr.cn
http://www.15wanjia.com/news/60451.html

相关文章:

  • wordpress新浪微博插件seo网络优化软件
  • 中国人做外贸网站都卖什么手续百度网站首页
  • 做网站需要套模板年度关键词有哪些
  • 网站建设制作设计珠海培训心得体会总结
  • 专注高密做网站哪家好山西搜索引擎优化
  • 手机网站制作电话百度搜索推广官网
  • 云南公司网站制作免费发布信息的平台有哪些
  • 微商手机网站制作抖音推广引流平台
  • 帮企网站建设代运营点击器
  • 《30天网站建设实录》网络营销软件代理
  • 黄页网站软件下载免费app营销活动方案
  • 无锡崇安网站建设seo工具优化软件
  • 网站选项怎么做青岛seo排名公司
  • 网站建设类电话销售信息流优化师培训机构
  • 上海网站建设seodian网站开发详细流程
  • 郑州网站制作郑州网站制作网站关键词推广
  • 毕设做系统与网站答辩软文外链购买平台
  • 织梦企业门户网站网页设计的流程
  • 国内如何做国外网站的兼职项目一份完整的市场调查方案
  • 海鲜网站模板上海建站seo
  • vs2010 iis 网站开发2022近期时事热点素材
  • 制作网页比较方便的软件关闭站长工具seo综合查询
  • 网站建设和销售有关吗哪些平台可以打小广告
  • 什么网站做美式软装设计社区推广方法有哪些
  • 手机怎么自己做网站百度热度指数排行
  • laravel 做中英文网站站长之家网站查询
  • 徐州网站排名优化如何创建自己的网站
  • 医院网站制作公司最新时事热点
  • 网站开发团队简介如何写百度排名点击
  • 企业在公司做的网站看不到新闻发布会