{"_id":"@ciniki/iclient-maplibregl","_rev":"3-7b871d760e83e93165f94f8be599af74","name":"@ciniki/iclient-maplibregl","dist-tags":{"latest":"12.0.2-custom"},"versions":{"12.0.1-dev":{"name":"@ciniki/iclient-maplibregl","version":"12.0.1-dev","keywords":["SuperMap","maplibregl"],"author":{"name":"SuperMap"},"license":"Apache-2.0","_id":"@ciniki/iclient-maplibregl@12.0.1-dev","maintainers":[{"name":"cinikic","email":"ciniki@foxmail.com"}],"homepage":"https://iclient.supermap.io","bugs":{"url":"https://github.com/SuperMap/iClient-JavaScript/issues"},"dist":{"shasum":"0311ac1360eb19692c95cc72b7121ed690e25a92","tarball":"https://registry.npmjs.org/@ciniki/iclient-maplibregl/-/iclient-maplibregl-12.0.1-dev.tgz","fileCount":3853,"integrity":"sha512-eWqvBF2t4tKDYE3ACS02GlJrRhRYIuRGVT3dl8VZ3IgSdKzf//GRn7TFwUqUVcAp6sPgRNb+xuHo5o59jg9rCg==","signatures":[{"sig":"MEUCICahQpzyK/ueKElQGeNYR7M7IMZOej0QqRHoHtqmJqf6AiEA/0XTA7EYjrsiq320QMDsY/OrAfREs8ac3b0i6m3c0cE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22456920},"main":"namespace.js","gitHead":"17df694f99676e182fe31e7e71a0699e1358cadc","_npmUser":{"name":"cinikic","email":"ciniki@foxmail.com"},"repository":{"url":"git+https://github.com/SuperMap/iClient-JavaScript.git","type":"git"},"_npmVersion":"10.9.2","description":"@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台， 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源，为用户提供了完整专业的 GIS 能力， 同时提供了优秀的可视化功能。","directories":{},"_nodeVersion":"22.16.0","dependencies":{"proj4":"2.17.0","maplibre-gl":"5.6.0","lodash.clonedeep":"^4.5.0","@supermapgis/iclient-common":"12.0.1-dev","@maplibre/maplibre-gl-style-spec":"^23.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/iclient-maplibregl_12.0.1-dev_1753688203276_0.5637457017380456","host":"s3://npm-registry-packages-npm-production"}},"12.0.1-custom":{"name":"@ciniki/iclient-maplibregl","version":"12.0.1-custom","keywords":["SuperMap","maplibregl"],"author":{"name":"SuperMap"},"license":"Apache-2.0","_id":"@ciniki/iclient-maplibregl@12.0.1-custom","maintainers":[{"name":"cinikic","email":"ciniki@foxmail.com"}],"homepage":"https://iclient.supermap.io","bugs":{"url":"https://github.com/SuperMap/iClient-JavaScript/issues"},"dist":{"shasum":"9c41445a0232ec2ed25d7efc39339452eb030a6b","tarball":"https://registry.npmjs.org/@ciniki/iclient-maplibregl/-/iclient-maplibregl-12.0.1-custom.tgz","fileCount":3853,"integrity":"sha512-pI0Dz5EBeB9bWImJWv45BvkJuA8N0zlFUaG1BHR7fjOQLHiibxz7BZAf37hwz0CcNuS9ZPXUaLpqdh+Uwd05+A==","signatures":[{"sig":"MEQCIDemU3YxB1EbjCQtcgeII66IWSbU9XGRnynPrXDkvE7iAiATbkpNNzjsmasnnAyZfaCQEi4Vw+qhyMjldWnPFpm4nQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22456921},"main":"namespace.js","gitHead":"17df694f99676e182fe31e7e71a0699e1358cadc","_npmUser":{"name":"cinikic","email":"ciniki@foxmail.com"},"repository":{"url":"git+https://github.com/SuperMap/iClient-JavaScript.git","type":"git"},"_npmVersion":"10.9.2","description":"@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台， 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源，为用户提供了完整专业的 GIS 能力， 同时提供了优秀的可视化功能。","directories":{},"_nodeVersion":"22.16.0","dependencies":{"proj4":"2.17.0","maplibre-gl":"5.6.0","lodash.clonedeep":"^4.5.0","@ciniki/iclient-common":"12.0.1-custom","@maplibre/maplibre-gl-style-spec":"^23.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/iclient-maplibregl_12.0.1-custom_1753688712330_0.42654285402743475","host":"s3://npm-registry-packages-npm-production"}},"12.0.2-custom":{"name":"@ciniki/iclient-maplibregl","description":"@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台， 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源，为用户提供了完整专业的 GIS 能力， 同时提供了优秀的可视化功能。","version":"12.0.2-custom","keywords":["SuperMap","maplibregl"],"main":"namespace.js","homepage":"https://iclient.supermap.io","repository":{"type":"git","url":"git+https://github.com/SuperMap/iClient-JavaScript.git"},"author":{"name":"SuperMap"},"license":"Apache-2.0","dependencies":{"@maplibre/maplibre-gl-style-spec":"^23.3.0","maplibre-gl":"5.6.0","@ciniki/iclient-common":"12.0.2-custom","lodash.clonedeep":"^4.5.0","proj4":"2.17.0"},"_id":"@ciniki/iclient-maplibregl@12.0.2-custom","gitHead":"17df694f99676e182fe31e7e71a0699e1358cadc","bugs":{"url":"https://github.com/SuperMap/iClient-JavaScript/issues"},"_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-OWxDnWY9s2bLuWToyP9G5plH8VD192FiYdoXs9ISy1dnacYlq6A0pdByBZBytewBvUhm/9EiLd10I/rsjnf8hg==","shasum":"60239c3aaa30a7da092b6adad7ae5d6f783ff480","tarball":"https://registry.npmjs.org/@ciniki/iclient-maplibregl/-/iclient-maplibregl-12.0.2-custom.tgz","fileCount":3853,"unpackedSize":22456476,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHGILDvbwBlrj/dPVSQbHVzuXoqvVe4CHdh8tyHjoMwxAiAKXiII+ll6jsFz0HH29CFRxvjfikog9h81avOC/hPQ5w=="}]},"_npmUser":{"name":"cinikic","email":"ciniki@foxmail.com"},"directories":{},"maintainers":[{"name":"cinikic","email":"ciniki@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/iclient-maplibregl_12.0.2-custom_1753692775560_0.2300635936618951"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-28T07:36:43.145Z","modified":"2025-07-28T08:52:56.059Z","12.0.1-dev":"2025-07-28T07:36:43.606Z","12.0.1-custom":"2025-07-28T07:45:12.670Z","12.0.2-custom":"2025-07-28T08:52:55.824Z"},"bugs":{"url":"https://github.com/SuperMap/iClient-JavaScript/issues"},"author":{"name":"SuperMap"},"license":"Apache-2.0","homepage":"https://iclient.supermap.io","keywords":["SuperMap","maplibregl"],"repository":{"type":"git","url":"git+https://github.com/SuperMap/iClient-JavaScript.git"},"description":"@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台， 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源，为用户提供了完整专业的 GIS 能力， 同时提供了优秀的可视化功能。","maintainers":[{"name":"cinikic","email":"ciniki@foxmail.com"}],"readme":"# @supermapgis/iclient-maplibregl\n\n@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台， 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源，为用户提供了完整专业的 GIS 能力， 同时提供了优秀的可视化功能。\n\n## 简介\n* 官网：[https://iclient.supermap.io](https://iclient.supermap.io)\n* 源码：[https://github.com/SuperMap/iClient-JavaScript/tree/master/src/maplibregl](https://github.com/SuperMap/iClient-JavaScript/tree/master/src/maplibregl)\n\n## 安装\n\n```\n npm install @supermapgis/iclient-maplibregl\n```\n\n## 开发\n\n在 HTML 文件中引入 CSS  文件\n\n```\n<link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet' />\n\n```\n\n在 JS 文件中加入如下代码\n\n```\nimport maplibre from 'maplibre-gl';\nimport {Logo, QueryByBoundsParameters, QueryService} from '@supermapgis/iclient-maplibregl';\n\nvar map, host = \"https://iserver.supermap.io\";\nvar url = host + \"/iserver/services/map-world/rest/maps/World\";\nvar attribution = \"<a href='https://maplibre.org/' target='_blank'>© Maplibre </a>\" +\n    \"| Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> \" + \" with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>\";\n\nvar map = new maplibre.Map({\n    container: 'map',\n    style: {\n        \"version\": 8,\n        \"sources\": {\n            \"raster-tiles\": {\n                \"attribution\": attribution,\n                \"type\": \"raster\",\n                \"tiles\": [host + '/iserver/services/maps/rest/maps/World/zxyTileImage.png?prjCoordSys={\"epsgCode\":3857}&z={z}&x={x}&y={y}'],\n                \"tileSize\": 256\n            }\n        },\n        \"layers\": [{\n            \"id\": \"simple-tiles\",\n            \"type\": \"raster\",\n            \"source\": \"raster-tiles\",\n            \"minzoom\": 0,\n            \"maxzoom\": 22\n        }],\n        \"sprite\": \"https://iclient.supermap.io/web/styles/street/sprite\"\n    },\n    center: [0, 0],\n    maxZoom: 18,\n    zoom: 2\n});\nmap.addControl(new Logo(), 'bottom-right');\nmap.addControl(new maplibre.NavigationControl(), 'top-left');\n\nmap.on('load', function () {\n    query();\n});\n\nfunction query() {\n    map.addLayer({\n        'id': 'polygonLayer',\n        'type': 'fill',\n        'source': {\n            'type': 'geojson',\n            'data': {\n                'type': 'Feature',\n                'geometry': {\n                    'type': 'Polygon',\n                    'coordinates': [[[0, 0], [60, 0], [60, 39], [0, 39], [0, 0]]]\n                }\n            }\n        },\n        'paint': {\n            'fill-outline-color': 'blue',\n            'fill-color': 'rgba(0, 0, 255, 0.1)'\n        }\n    });\n\n    var param = new QueryByBoundsParameters({\n        queryParams: {name: \"Capitals@World.1\"},\n        bounds: new maplibre.LngLatBounds([0, 0], [60, 39])\n    });\n\n    new QueryService(url).queryByBounds(param, function (serviceResult) {\n        var recordsets = serviceResult && serviceResult.result && serviceResult.result.recordsets;\n        var features = recordsets && recordsets[0] && recordsets[0].features;\n        map.addLayer({\n            \"id\": \"points\",\n            \"type\": \"circle\",\n            \"paint\": {\n                \"circle-radius\": 6,\n                \"circle-color\": \"#007cbf\",\n                \"circle-opacity\": 0.1,\n                \"circle-stroke-width\": 2,\n                \"circle-stroke-color\": \"#007cbf\",\n                \"circle-stroke-opacity\": 0.5\n            },\n            \"source\": {\n                \"type\": \"geojson\",\n                \"data\": features\n            }\n        });\n    });\n}\n```\n\n## 示例\n [https://github.com/SuperMap/iClient-JavaScript/tree/master/examples/maplibregl](https://github.com/SuperMap/iClient-JavaScript/tree/master/examples/maplibregl)","readmeFilename":"README.md"}