diff --git a/bundle.js b/bundle.js index 3a48683..c86d00f 100644 --- a/bundle.js +++ b/bundle.js @@ -16,7 +16,7 @@ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var ol_ol_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ol/ol.css */ \"./node_modules/ol/ol.css\");\n/* harmony import */ var ol_layerswitcher_dist_ol_layerswitcher_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol-layerswitcher/dist/ol-layerswitcher.css */ \"./node_modules/ol-layerswitcher/dist/ol-layerswitcher.css\");\n/* harmony import */ var ol_Map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Map */ \"./node_modules/ol/Map.js\");\n/* harmony import */ var ol_View__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ol/View */ \"./node_modules/ol/View.js\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/proj */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/layer/Group */ \"./node_modules/ol/layer/Group.js\");\n/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/layer/Tile */ \"./node_modules/ol/layer/Tile.js\");\n/* harmony import */ var ol_source_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/source.js */ \"./node_modules/ol/source/OSM.js\");\n/* harmony import */ var ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/source/XYZ.js */ \"./node_modules/ol/source/XYZ.js\");\n/* harmony import */ var ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ol/format/MVT.js */ \"./node_modules/ol/format/MVT.js\");\n/* harmony import */ var ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ol/layer/VectorTile.js */ \"./node_modules/ol/layer/VectorTile.js\");\n/* harmony import */ var ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/source/OGCMapTile.js */ \"./node_modules/ol/source/OGCMapTile.js\");\n/* harmony import */ var ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ol/source/OGCVectorTile.js */ \"./node_modules/ol/source/OGCVectorTile.js\");\n/* harmony import */ var ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol-layerswitcher */ \"./node_modules/ol-layerswitcher/dist/ol-layerswitcher.js\");\n/* harmony import */ var ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar map = new ol_Map__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n target: 'map',\n layers: [\n new ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__[\"default\"]({\n 'title': 'Base maps',\n layers: [\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'OSM',\n type: 'base',\n visible: true,\n source: new ol_source_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]()\n }),\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'Esri Tile Layer',\n type: 'base',\n visible: true,\n source: new ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]({\n attributions:\n 'Tiles © ArcGIS',\n url:\n 'https://server.arcgisonline.com/ArcGIS/rest/services/' +\n 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}',\n }),\n })\n ]\n }),\n new ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__[\"default\"]({\n title: 'OGC API - Tiles',\n layers: [\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'Blue Marble',\n visible: false,\n source: new ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]({\n url: 'https://maps.gnosis.earth/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',\n }),\n }),\n new ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]({\n title: 'Natural Earth',\n visible: false,\n source: new ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]({\n url: 'https://maps.gnosis.earth/ogcapi/collections/NaturalEarth:cultural:ne_10m_admin_0_countries/tiles/WebMercatorQuad',\n format: new ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](),\n }),\n background: '#d1d1d1',\n style: {\n 'stroke-width': 0.6,\n 'stroke-color': '#8c8b8b',\n 'fill-color': '#f7f7e9',\n },\n }),\n new ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]({\n title: 'Daara',\n visible: false,\n source: new ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]({\n url: 'https://demo.ldproxy.net/daraa/tiles/WebMercatorQuad',\n format: new ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](),\n })\n }),\n ]\n })\n ],\n view: new ol_View__WEBPACK_IMPORTED_MODULE_13__[\"default\"]({\n center: (0,ol_proj__WEBPACK_IMPORTED_MODULE_2__.transform)([-0.92, 52.96], 'EPSG:4326', 'EPSG:3857'),\n zoom: 2\n })\n});\n\nvar layerSwitcher = new (ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3___default())();\nmap.addControl(layerSwitcher);\n\n\n//# sourceURL=webpack://ol-layerswitcher-webpack/./main.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var ol_ol_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ol/ol.css */ \"./node_modules/ol/ol.css\");\n/* harmony import */ var ol_layerswitcher_dist_ol_layerswitcher_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol-layerswitcher/dist/ol-layerswitcher.css */ \"./node_modules/ol-layerswitcher/dist/ol-layerswitcher.css\");\n/* harmony import */ var ol_Map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Map */ \"./node_modules/ol/Map.js\");\n/* harmony import */ var ol_View__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ol/View */ \"./node_modules/ol/View.js\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/proj */ \"./node_modules/ol/proj.js\");\n/* harmony import */ var ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/layer/Group */ \"./node_modules/ol/layer/Group.js\");\n/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/layer/Tile */ \"./node_modules/ol/layer/Tile.js\");\n/* harmony import */ var ol_source_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/source.js */ \"./node_modules/ol/source/OSM.js\");\n/* harmony import */ var ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/source/XYZ.js */ \"./node_modules/ol/source/XYZ.js\");\n/* harmony import */ var ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ol/format/MVT.js */ \"./node_modules/ol/format/MVT.js\");\n/* harmony import */ var ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ol/layer/VectorTile.js */ \"./node_modules/ol/layer/VectorTile.js\");\n/* harmony import */ var ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/source/OGCMapTile.js */ \"./node_modules/ol/source/OGCMapTile.js\");\n/* harmony import */ var ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ol/source/OGCVectorTile.js */ \"./node_modules/ol/source/OGCVectorTile.js\");\n/* harmony import */ var ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol-layerswitcher */ \"./node_modules/ol-layerswitcher/dist/ol-layerswitcher.js\");\n/* harmony import */ var ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar map = new ol_Map__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n target: 'map',\n layers: [\n new ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__[\"default\"]({\n 'title': 'Base maps',\n layers: [\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'OSM',\n type: 'base',\n visible: true,\n source: new ol_source_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]()\n }),\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'Esri Nat Geo World Map',\n type: 'base',\n visible: true,\n source: new ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]({\n attributions:\n 'Tiles © Esri — National Geographic, Esri, ' +\n 'DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC',\n url:\n 'https://server.arcgisonline.com/ArcGIS/rest/services/' +\n 'NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}',\n }),\n }),\n/* new TileLayer({\n title: 'Esri Tile Layer',\n type: 'base',\n visible: true,\n source: new XYZ({\n attributions:\n 'Tiles © ArcGIS',\n url:\n 'https://server.arcgisonline.com/ArcGIS/rest/services/' +\n 'World_Topo_Map/MapServer/tile/{z}/{y}/{x}',\n }),\n })\n */ ]\n }),\n new ol_layer_Group__WEBPACK_IMPORTED_MODULE_5__[\"default\"]({\n title: 'OGC API - Tiles',\n layers: [\n new ol_layer_Tile__WEBPACK_IMPORTED_MODULE_6__[\"default\"]({\n title: 'Blue Marble',\n visible: false,\n source: new ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]({\n url: 'https://maps.gnosis.earth/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',\n }),\n }),\n new ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]({\n title: 'Natural Earth',\n visible: false,\n source: new ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]({\n url: 'https://maps.gnosis.earth/ogcapi/collections/NaturalEarth:cultural:ne_10m_admin_0_countries/tiles/WebMercatorQuad',\n format: new ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"](),\n }),\n background: '#d1d1d1',\n style: {\n 'stroke-width': 0.6,\n 'stroke-color': '#8c8b8b',\n 'fill-color': '#f7f7e9',\n },\n })\n ]\n })\n ],\n view: new ol_View__WEBPACK_IMPORTED_MODULE_13__[\"default\"]({\n center: (0,ol_proj__WEBPACK_IMPORTED_MODULE_2__.transform)([-0.92, 52.96], 'EPSG:4326', 'EPSG:3857'),\n zoom: 2\n })\n});\n\nvar layerSwitcher = new (ol_layerswitcher__WEBPACK_IMPORTED_MODULE_3___default())();\nmap.addControl(layerSwitcher);\n\n\n//# sourceURL=webpack://ol-layerswitcher-webpack/./main.js?"); /***/ }), diff --git a/index.html b/index.html index 70a1049..b839d15 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,8 @@
+ +This map shows a bunch of OGC API - Tiles layers (e.g.: map tiles, vector tiles). + They are easily integrated, using the OpenLayers library, which supports the standard out-of-the-box + using the OGCMapTile + and OGCVectorTile classes (see code sample bellow). +
+
+ layers: [
+ new TileLayer({
+ source: new OGCMapTile({
+ url: 'https://maps.gnosis.earth/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',
+ }),
+ }),
+ new VectorTileLayer({
+ source: new OGCVectorTile({
+ url: 'https://maps.gnosis.earth/ogcapi/collections/NaturalEarth:cultural:' +
+ 'ne_10m_admin_0_countries/tiles/WebMercatorQuad',
+ format: new MVT(),
+ })
+ })
+ ]
+
+