123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296 |
- <!--********************************************************************
- * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
- *********************************************************************-->
- <html>
- <head>
- <meta charset='utf-8'/>
- <title data-i18n="resources.title_beijingOSMStyle"></title>
- <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
- <script type="text/javascript" src="../js/include-web.js"></script>
- <script type="text/javascript" exclude='iclient-mapboxgl' src="../../dist/mapboxgl/include-mapboxgl.js"></script>
- <style>
- body {
- margin: 0;
- padding: 0;
- }
- #map {
- position: absolute;
- top: 0;
- bottom: 0;
- width: 100%;
- }
- </style>
- </head>
- <body>
- <div id='map'></div>
- <script type="text/javascript">
- var host = window.isLocal ? window.server : "https://iserver.supermap.io";
- var attribution = "<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +
- " with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +
- " Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";
- var map = new mapboxgl.Map({
- container: 'map', // container id
- style: {
- "version": 8,
- "sources": {
- "vector-tiles": {
- "attribution": attribution,
- "type": "vector",
- "tiles": [host + "/iserver/services/map-beijing/rest/maps/beijingMap/tileFeature.mvt?returnAttributes=true&compressTolerance=-1&width=512&height=512&viewBounds={bbox-epsg-3857}&expands=0:0_2,132_128,138_64,141_32,143_16,145_8,147_4"]
- },
- },
- "sprite": "https://iclient.supermap.io/web/styles/osm/sprite",
- "glyphs": host + "/iserver/services/map-beijing/rest/maps/beijingMap/tileFeature/sdffonts/{fontstack}/{range}.pbf",
- "layers": []
- },
- center: [116.4, 39.9],
- minZoom: 10,
- zoom: 11
- });
- map.addControl(new mapboxgl.NavigationControl(), 'top-left');
- map.on('load', function () {
- map.addLayer({
- "id": "background",
- "type": "background",
- "layout": {},
- "paint": {
- "background-color": "#f8f4f0"
- }
- });
- map.addLayer({
- "id": "界线@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "界线@北京",
- "layout": {
- "line-join": "round"
- },
- "paint": {
- "line-color": "#9e9cab",
- "line-dasharray": [
- 3,
- 1,
- 1,
- 1
- ],
- "line-width": {
- "base": 1.4,
- "stops": [
- [
- 4,
- 0.4
- ],
- [
- 5,
- 1
- ],
- [
- 12,
- 3
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": "立交桥绿地R@北京",
- "type": "fill",
- "source": "vector-tiles",
- "source-layer": "立交桥绿地R@北京",
- "paint": {
- "fill-color": "#6a4",
- "fill-opacity": 0.1,
- "fill-outline-color": "hsla(0, 0%, 0%, 0.03)",
- "fill-antialias": true
- }
- });
- map.addLayer({
- "id": "绿地R@北京",
- "type": "fill",
- "source": "vector-tiles",
- "source-layer": "绿地R@北京",
- "paint": {
- "fill-color": "#d8e8c8",
- "fill-opacity": 1
- }
- });
- map.addLayer({
- "id": " 双线河R@北京",
- "type": "fill",
- "source": "vector-tiles",
- "source-layer": "双线河R@北京",
- "paint": {
- "fill-color": "hsl(210, 67%, 85%)"
- }
- });
- map.addLayer({
- "id": "湖泊、水库R@北京",
- "type": "fill",
- "source": "vector-tiles",
- "source-layer": "湖泊、水库R@北京",
- "paint": {
- "fill-color": "hsl(210, 67%, 85%)"
- }
- });
- map.addLayer({
- "id": " 四级道路L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "四级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#cfcdca",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 0.5
- ],
- [
- 13,
- 1
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 四级道路L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "四级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#fff",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 13.5,
- 0
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 三级道路L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "三级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#cfcdca",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 12,
- 0.5
- ],
- [
- 13,
- 1
- ],
- [
- 14,
- 4
- ],
- [
- 20,
- 15
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 三级道路L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "三级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round"
- },
- "paint": {
- "line-color": "#fff",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 13.5,
- 0
- ],
- [
- 14,
- 2.5
- ],
- [
- 20,
- 11.5
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": "二级道路L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "二级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#e9ac77",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 8,
- 1.5
- ],
- [
- 20,
- 17
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": "二级道路L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "二级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#fea",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 8,
- 0.5
- ],
- [
- 20,
- 13
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 一级道路L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "一级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#e9ac77",
- "line-opacity": 1,
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 一级道路L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "一级道路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#fea",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 省道L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "省道L@北京",
- "paint": {
- "line-color": "#e9ac77",
- "line-opacity": {
- "stops": [
- [
- 5,
- 0
- ],
- [
- 6,
- 1
- ]
- ]
- },
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 省道L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "省道L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#fea",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": " 高速公路L@北京",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "高速公路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#e9ac77",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 1.5
- ],
- [
- 20,
- 22
- ]
- ]
- },
- "line-opacity": 1
- }
- });
- map.addLayer({
- "id": " 高速公路L@北京1",
- "type": "line",
- "source": "vector-tiles",
- "source-layer": "高速公路L@北京",
- "layout": {
- "line-cap": "round",
- "line-join": "round",
- "visibility": "visible"
- },
- "paint": {
- "line-color": "#fc8",
- "line-width": {
- "base": 1.2,
- "stops": [
- [
- 7,
- 0.5
- ],
- [
- 20,
- 18
- ]
- ]
- }
- }
- });
- map.addLayer({
- "id": "区政府驻地@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "区政府驻地@北京",
- "layout": {
- "text-offset": [-1.5, -0.5],
- "text-anchor": "bottom-left",
- "text-field": "{NAME}",
- "text-max-width": 7,
- "text-font": [
- "DIN Offc Pro Medium",
- "Arial Unicode MS Regular"
- ],
- "text-size": 22
- },
- "paint": {
- "text-color": "hsl(230, 8%, 62%)",
- "text-opacity": {
- "base": 1,
- "stops": [
- [
- 11.99,
- 1
- ],
- [
- 12,
- 0
- ]
- ]
- },
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "标志建筑@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "标志建筑@北京",
- "layout": {
- "text-offset": [-1.5, -0.5],
- "text-anchor": "bottom-left",
- "text-field": "{NAME}",
- "text-max-width": 7,
- "text-size": 14
- },
- "paint": {
- "text-color": "hsl(26, 25%, 32%)",
- "text-opacity": {
- "base": 1,
- "stops": [
- [
- 10.99,
- 0
- ],
- [
- 11,
- 1
- ]
- ]
- },
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": " 四级道路Name",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "四级道路L@北京",
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-field": "{道路名称}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#765",
- "text-opacity": {
- "base": 1,
- "stops": [
- [
- 14.99,
- 0
- ],
- [
- 15,
- 1
- ]
- ]
- },
- "text-halo-width": 1
- }
- });
- map.addLayer({
- "id": " 三级道路Name",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "三级道路L@北京",
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-field": "{道路名称}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#765",
- "text-halo-width": 1
- }
- });
- map.addLayer({
- "id": " 二级道路Name",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "二级道路L@北京",
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-field": "{道路名称}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#765",
- "text-halo-width": 1
- }
- });
- map.addLayer({
- "id": " 一级道路Name",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "一级道路L@北京",
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-field": "{道路名称}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#765",
- "text-opacity": {
- "base": 1,
- "stops": [
- [
- 13.99,
- 0
- ],
- [
- 14,
- 1
- ]
- ]
- },
- "text-halo-width": 1
- }
- });
- map.addLayer({
- "id": " 省道Name",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "省道L@北京",
- "layout": {
- "text-size": {
- "base": 1,
- "stops": [
- [
- 13,
- 12
- ],
- [
- 14,
- 13
- ]
- ]
- },
- "text-field": "{道路名称}",
- "symbol-placement": "line",
- "text-rotation-alignment": "map"
- },
- "paint": {
- "text-halo-blur": 0.5,
- "text-color": "#765",
- "text-halo-width": 1,
- "text-opacity": {
- "base": 1,
- "stops": [
- [
- 12.99,
- 0
- ],
- [
- 13,
- 1
- ]
- ]
- },
- }
- });
- map.addLayer({
- "id": "立交桥名称P@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "立交桥名称P@北京",
- "layout": {
- "text-offset": [-1, -1],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "长途汽车站@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "长途汽车站@北京",
- "layout": {
- "icon-image": "bus_11",
- "text-offset": [-1, -1],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "图书馆@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "图书馆@北京",
- "layout": {
- "icon-image": "library_11",
- "text-offset": [-1, -1],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "公园@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "公园@北京",
- "layout": {
- "icon-image": "park_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "综合性广场@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "综合性广场@北京",
- "layout": {
- "icon-image": "campsite_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "旅游景点@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "旅游景点@北京",
- "layout": {
- "icon-image": "volcano_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "医疗卫生@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "医疗卫生@北京",
- "layout": {
- "icon-image": "hospital_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "娱乐场所@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "娱乐场所@北京",
- "layout": {
- "icon-image": "amusement_park_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "大厦@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "大厦@北京",
- "layout": {
- "icon-image": "picnic_site_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "文化场所@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "文化场所@北京",
- "layout": {
- "icon-image": "art_gallery_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "运动场所@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "运动场所@北京",
- "layout": {
- "icon-image": "bicycle_share_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "交通运输@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "交通运输@北京",
- "layout": {
- "icon-image": "bakery_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "其它@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "其它@北京",
- "layout": {
- "icon-image": "toilet_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "filter": [
- "==",
- "NAME",
- "公厕"
- ],
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "服务行业@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "服务行业@北京",
- "layout": {
- "icon-image": "embassy_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "其它@北京2",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "其它@北京",
- "layout": {
- "icon-image": "car_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "filter": [
- "==",
- "NAME",
- "停车场"
- ],
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "邮政电信@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "邮政电信@北京",
- "layout": {
- "icon-image": "post_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 10,
- "text-max-width": 18
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "商场@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "商场@北京",
- "layout": {
- "icon-image": "grocery_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "综合性商店@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "综合性商店@北京",
- "layout": {
- "icon-image": "grocery_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "饭店@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "饭店@北京",
- "layout": {
- "icon-image": "restaurant_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "加油站@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "加油站@北京",
- "layout": {
- "icon-image": "fuel_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "建筑@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "建筑@北京",
- "layout": {
- "icon-image": "place_of_worship_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "码头@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "码头@北京",
- "layout": {
- "icon-image": "harbor_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "机场@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "机场@北京",
- "layout": {
- "icon-image": "airport_11",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "火车站@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "火车站@北京",
- "layout": {
- "icon-image": "rail_15",
- "text-offset": [0, -0.5],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- map.addLayer({
- "id": "地名@北京",
- "type": "symbol",
- "source": "vector-tiles",
- "source-layer": "地名@北京",
- "layout": {
- "icon-image": "dot_11",
- "text-offset": [0, -0.3],
- "text-anchor": "bottom",
- "text-field": "{NAME}",
- "text-size": 12
- },
- "paint": {
- "text-color": "#666",
- "text-opacity": 1,
- "text-halo-color": "#ffffff",
- "text-halo-width": 1,
- "text-halo-blur": 1
- }
- });
- });
- </script>
- </body>
- </html>
|