editor-layer-index
editor-layer-index copied to clipboard
Allow URL to be an object
As I realised in #2626 the ESRI service URLs can be quite complex, we should consider extending the schema so the URL can be provided as an object which would then be assembled by the build into the current output.
This makes it much easier for humans to create, review and modify the URL.
before
"url": "https://portal.spatial.nsw.gov.au/server/rest/services/StrataHub/MapServer/export?layers=show%3A0&imageSR={wkid}&bbox={bbox}&bboxSR={wkid}&format=png32&size={width},{height}&transparent=true&f=image&dynamicLayers=%5B%0D%0A%7B%0D%0A%22id%22%3A0%2C%0D%0A%22source%22%3A%7B%0D%0A%22type%22%3A%22mapLayer%22%2C%0D%0A%22mapLayerId%22%3A0%0D%0A%7D%2C%0D%0A%22drawingInfo%22%3A%7B%0D%0A%22renderer%22%3A%7B%0D%0A%22type%22%3A%22simple%22%2C%0D%0A%22symbol%22%3A%7B%0D%0A%22type%22%3A%22esriSFS%22%2C%0D%0A%22style%22%3A%22esriSFSSolid%22%2C%0D%0A%22color%22%3A%5B201%2C242%2C252%2C128%5D%2C%0D%0A%22outline%22%3A%7B%0D%0A%22type%22%3A%22esriSLS%22%2C%0D%0A%22style%22%3A%22esriSLSolid%22%2C%0D%0A%22color%22%3A%5B110%2C110%2C110%2C255%5D%2C%0D%0A%22width%22%3A1%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%5D%0D%0A",
after
{
url: "https://portal.spatial.nsw.gov.au/server/rest/services/StrataHub/MapServer/export",
searchParams: {
layers: "show:0",
imageSR: "{wkid}",
bbox: "{bbox}",
bboxSR: "{wkid}",
format: "png32",
size: "{width},{height}",
transparent: "true",
f: "image",
dynamicLayers: [
{
"id": 0,
"source": {
"type": "mapLayer",
"mapLayerId": 0
},
"drawingInfo": {
"renderer": {
"type": "simple",
"symbol": {
"type": "esriSFS",
"style": "esriSFSSolid",
"color": [
201,
242,
252,
128
],
"outline": {
"type": "esriSLS",
"style": "esriSLSolid",
"color": [
110,
110,
110,
255
],
"width": 0
}
}
}
}
}
]
}
}
I'm not convinced that expending effort to make it easier to use the proprietary services of the Microsoft of geo is something we should do .
At least ESRI should be funding it if they want it and that includes the necessary changes for consumers of the data too (which adding this in lieu of a simple URL would force them to add).
I don't really see much difference between the services that publishers choose, XYZ raster tiles, OGC WMS, ESRI MapServer/FeatureServer, XYZ Mapbox Vector Tiles, Cloud Optimised Geotiff. While it's easier for us to say we only support one method, it limits the number of layers we can include for mappers to use.
This ticket is about making life easier for us based on what we can control and what services and formats they are made available. We can't control what ESRI or each data publisher do, so the options are
- implement this and make it easier for us maintainers of ELI
- don't implement this, but still use the ESRI services and have a harder time maintaining the entries
- drop the layers completely from the index, and let mappers suffer
- implement this and make it easier for us maintainers of ELI I think you are confusing your two roles here, getting the entry right is the job of the person submitting the PR which in general isn't one of the maintainers, and if it doesn't work, their job to fix it.
- don't implement this, but still use the ESRI services and have a harder time maintaining the entries
See above.
- drop the layers completely from the index, and let mappers suffer
- point out to the entity in question that they should be using international open standards to publish their data and that that would make the life of the consumers of their data easier? (this is again naturally up to the PR submitter).