Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions configure/src/metaconfigs/layer-tile-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,22 @@
]
},
{
"subname": "Source",
"components": [
{
"field": "sourceType",
"name": "Source Type",
"description": "What the 'Source URL' is meant to reference. See the 'Source URL' description for more.",
"type": "dropdown",
"width": 2,
"options": ["url", "COG", "stac-collection"]
},
{
"field": "url",
"name": "URL",
"description": "A path that points to a tileset, service, or file. If the path is relative, it will be relative to the mission's /Missions/{mission} directory.\n\t<strong>• TMS:</strong> Tile Map Service tiles are 256x256 sized images hierarchically organized by zoom level and referenced with x and y coordinates. These are the standard format for web tiles and are the format that MMGIS's auxiliary tiling scripts output. Append /{z}/{x}/{y}.png to your URL.\n\t<strong>• WMTS:</strong> Web Map Tile Service is the same exact concept as TMS but it has an inverted Y-axis. Just like TMS, append /{z}/{x}/{y}.png to your URL.\n\t<strong>• WMS:</strong> Web Map Service tiles are a popular way of publishing maps by professional GIS software. This format is similar to the previous two formats, but more generic and not so well optimized for use in web maps. A WMS image is defined by the coordinates of its corners. A layer (or list of layers) should be provided as an options by appending ?layers=<your_layer_name><,another_if_you _want> to your URL. To override WMS parameters append &<wms_param>=<value> again to the URL after the 'layers' parameters. If desired, use &TILESIZE= to change the tile size of the request and layer away from the default of 256. Example URL: http://ows.mundialis.de/services/service?layers=TOPO-WMS,OSM-Overlay-WMS\n\t<strong>• GeoTiff:</strong> A URL to the .tif. Note that this is not tiled and clients will download the entire file.\n\t<strong>• COG:</strong> A URL to the .tif and make sure the 'Use TiTiler' option is enabled.\nThe following constructed URLs can also be used:\n\t<strong>• 'stac-collection:{collection}'</strong> - If titiler-pgstac is available, the tileset is the mosaicked COGs within the specified STAC collection.",
"name": "Source URL",
"description": "<strong>• URL: '{url}'</strong> A path that points to a tileset, service, or file. If the path is relative, it will be relative to the mission's /Missions/{mission} directory.\n\t<strong>• URL (TMS):</strong> Tile Map Service tiles are 256x256 sized images hierarchically organized by zoom level and referenced with x and y coordinates. These are the standard format for web tiles and are the format that MMGIS's auxiliary tiling scripts output. Append /{z}/{x}/{y}.png to your URL.\n\t<strong>• URL (WMTS):</strong> Web Map Tile Service is the same exact concept as TMS but it has an inverted Y-axis. Just like TMS, append /{z}/{x}/{y}.png to your URL.\n\t<strong>• URL (WMS):</strong> Web Map Service tiles are a popular way of publishing maps by professional GIS software. This format is similar to the previous two formats, but more generic and not so well optimized for use in web maps. A WMS image is defined by the coordinates of its corners. A layer (or list of layers) should be provided as an options by appending ?layers=<your_layer_name><,another_if_you _want> to your URL. To override WMS parameters append &<wms_param>=<value> again to the URL after the 'layers' parameters. If desired, use &TILESIZE= to change the tile size of the request and layer away from the default of 256. Example URL: http://ows.mundialis.de/services/service?layers=TOPO-WMS,OSM-Overlay-WMS\n\t<strong>• URL (GeoTiff): '{url_to_tif.tif}'</strong> A URL to the .tif. Note that this is not tiled and clients will download the entire file.\n<strong>• COG: '{url_to_cog.tif}'</strong> A URL to the .tif and make sure the 'Use TiTiler' option is enabled.\n<strong>• 'STAC-COLLECTION: '{name_of_an_mmgis_stac_collection}'</strong> - If titiler-pgstac is available, the tileset is the mosaicked COGs within the specified STAC collection.",
"type": "text",
"width": 8
"width": 6
}
]
},
Expand Down
23 changes: 20 additions & 3 deletions configure/src/metaconfigs/layer-vector-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,30 @@
]
},
{
"subname": "Source",
"components": [
{
"field": "sourceType",
"name": "Source Type",
"description": "What the 'Source URL' is meant to reference. See the 'Source URL' description for more.",
"type": "dropdown",
"width": 2,
"options": [
"url",
"geodatasets",
"api",
"stac",
"stac-catalog",
"stac-collection",
"stac-item"
]
},
{
"field": "url",
"name": "URL",
"description": "A file path that points to a geojson. If the path is relative, it will be relative to the mission's directory. The URL must contain a proper placeholder ending such as: {z}/{x}/{y}.png.\nAlternatively vectors can be served with Geodatasets or through API calls via the following constructed URLs:\n\t<strong>• 'geodatasets:{geodataset_name}'</strong> - Simply go to 'Manage Geodatasets' at the bottom left, upload a geojson and link to it in this URL field with 'geodatasets:{geodataset_name}'\n\t<strong>• 'api:publishedall'</strong> - Grabs all features published via the DrawTool.\n\t<strong>• 'api:published:{file_intent}'</strong> - Grabs all features published via the DrawTool of a certain intent. Possible values are: roi, campaign, campsite, signpost, trail, all\n\t<strong>• 'api:drawn:{file_id}'</strong> - Grabs a user drawn file from the DrawTool. The file_id is an integer and can be found by hovering over the desired file in the DrawTool. Note that if the file chosen is still private, the file owner will be the only user who can view it.",
"name": "Source URL",
"description": "<strong>\t• URL: '{url}' - A file path that points to a geojson. If the path is relative, it will be relative to the mission's directory.\n\t<strong>• GeoDatasets: '{geodataset_name}'</strong> - Simply go to 'Manage Geodatasets' at the bottom left, upload a geojson and link to it in this URL field with '{geodataset_name}'\n\t<strong>• API: 'publishedall'</strong> - Grabs all features published via the DrawTool.\n\t<strong>• API: 'published:{file_intent}'</strong> - Grabs all features published via the DrawTool of a certain intent. Possible values are: roi, campaign, campsite, signpost, trail, all\n\t<strong>• API: 'drawn:{file_id}'</strong> - Grabs a user drawn file from the DrawTool. The file_id is an integer and can be found by hovering over the desired file in the DrawTool. Note that if the file chosen is still private, the file owner will be the only user who can view it.\n\t<strong>• STAC: '{url_to_stac}'</strong> - Point to a STAC catalog/collection/item of GeoJSON features.\n\t<strong>• STAC-CATALOG: '{url_to_stac_catalog}'</strong> - Use this prefix if the URL is specifically to a Catalog object.\n\t<strong>• STAC-COLLECTION: '{url_to_stac_collection}'</strong> - Use this prefix if the URL is specifically to a Collection object.\n\t<strong>• STAC-ITEM: '{url_to_stac_item}'</strong> - Use this prefix if the URL is to an Item object\n\t\t• If the underlying data is a COG or similar data product, use the <strong>Tile</strong> layer type instead.",
"type": "text",
"width": 12
"width": 10
}
]
},
Expand Down
11 changes: 10 additions & 1 deletion src/essence/Basics/Layers_/Layers_.js
Original file line number Diff line number Diff line change
Expand Up @@ -3640,7 +3640,16 @@ function parseConfig(configData, urlOnLayers) {
d[i] = { display_name: d[i].name, ...d[i] }
d[i].name = d[i].uuid || d[i].name

//Create parsed layers named
// If sourceType, prefix onto url
if (
d[i].sourceType != null &&
d[i].sourceType !== 'url' &&
d[i].url.indexOf(`${d[i].sourceType}:`) !== 0
) {
d[i].url = `${d[i].sourceType}:${d[i].url}`
}

// Create parsed layers named
L_.layers.data[d[i].name] = d[i]

if (d[i].display_name === 'TimeCogs') {
Expand Down