Comments (14)
The parser is not using the orderedAxes
property in the json, and defauiting to the Lat/Lon axisOrientation
for EPSG:4326.
from openlayers.
I'd expect that matrix set request to return a json response, but (in the browser) if returns a HTML response, that might be unexpected
from openlayers.
Vector tiles do not support client side reprojection. If you want to consume an EPSG:4326 service, your map's view projection also needs to be EPSG:4326. Also note that you do not need to specify featureProjection
and dataProjection
on the MVT format.
from openlayers.
I'd expect that matrix set request to return a json response, but (in the browser) if returns a HTML response, that might be unexpected
If that's the case, then you won't get it to work with my suggestion above. That might be a problem of the service you're consuming.
from openlayers.
Vector tiles do not support client side reprojection. If you want to consume an EPSG:4326 service, your map's view projection also needs to be EPSG:4326. Also note that you do not need to specify
featureProjection
anddataProjection
on the MVT format.
Thanks for the comment @ahocevar . My view is indeed in 4326, but that does not change anything. I am unable to show any 4326 vector tiles.
,
view: new View({
center: [0,0],
zoom: 2,
projection: 'EPSG:4326'
})
from openlayers.
I'd expect that matrix set request to return a json response, but (in the browser) if returns a HTML response, that might be unexpected
If that's the case, then you won't get it to work with my suggestion above. That might be a problem of the service you're consuming.
@ahocevar the same service works without problems, with a WebMercatorQuad Tile matrix set
from openlayers.
I'd expect that matrix set request to return a json response, but (in the browser) if returns a HTML response, that might be unexpected
The url for a json response is https://maps.gnosis.earth/ogcapi/tileMatrixSets/WorldCRS84Quad?f=json
from openlayers.
I'd expect that matrix set request to return a json response, but (in the browser) if returns a HTML response, that might be unexpected
The url for a json response is https://maps.gnosis.earth/ogcapi/tileMatrixSets/WorldCRS84Quad?f=json
@mike-000 I would expect the client to get the right format, by using content negotiation. There should be no need to enforce it with the "f" parameter.
from openlayers.
I would expect the client to get the right format, by using content negotiation. There should be no need to enforce it with the "f" parameter.
Yes, it does return a json when the application sets a Accept: application/json
header. The reason no tiles are loaded is the calculated tile grid has an incorrect extent [90, -360, 450, -180]
https://codesandbox.io/s/ogc-vector-tiles-forked-pkzctf
from openlayers.
I would expect the client to get the right format, by using content negotiation. There should be no need to enforce it with the "f" parameter.
Yes, it does return a json when the application sets a
Accept: application/json
header. The reason no tiles are loaded is the calculated tile grid has an incorrect extent[90, -360, 450, -180]
https://codesandbox.io/s/ogc-vector-tiles-forked-pkzctf
Unfortunately I cannot open your sandbox. Here is my code: https://github.com/ogcincubator/ogcapi-tiles-map/blob/master/main.js
from openlayers.
The codesandbox is based on https://openlayers.org/en/latest/examples/ogc-vector-tiles.html with the main.js changed to
const map = new Map({
target: 'map',
layers: [
new VectorTileLayer({
source: new OGCVectorTile({
url:
'https://maps.gnosis.earth/ogcapi/collections/NaturalEarth:cultural:ne_10m_admin_0_countries/tiles/WorldCRS84Quad',
format: new MVT(),
projection: 'EPSG:4326',
}),
background: '#d1d1d1',
style: {
'stroke-width': 0.6,
'stroke-color': '#8c8b8b',
'fill-color': '#f7f7e9',
},
}),
],
view: new View({
center: [0, 0],
zoom: 1,
projection: 'EPSG:4326',
}),
});
setTimeout(() => {
console.log(map.getLayers().item(0).getSource().getTileGrid().getExtent());
}, 5000);
from openlayers.
Thank you @mike-000! Indeed the grid with in 4326 does not look right:
[90, -360, 450, -180]
While the grid in 3857 looks like this:
[-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244]
I assume the problem is in this file?
https://github.com/openlayers/openlayers/blob/main/src/ol/tilegrid/TileGrid.js
from openlayers.
It will be an incorrect extent passed to that constructor at https://github.com/openlayers/openlayers/blob/main/src/ol/source/ogcTileUtil.js#L293
from openlayers.
#15524 fixes the axis order when a projection is specified in the constructor, but there is a separate issue that specifying the projection should not be necessary, the crs in the TileMatrixSet could be used but isn't.
from openlayers.
Related Issues (20)
- GeoTiff reprojection from WGS84 to Mercator HOT 11
- COG -> GeoTIFF() + normalize:false -> TileLayer is broken on many newer Android phones HOT 3
- The distance measured by the circle and line segment in OpenLayers is not the same. HOT 6
- Save the rendered size of Icons (and other style content) when the View fit is changed HOT 2
- The new Google Maps source in v9 doesn't comply with Google's policies by default (missing logo and attribution) HOT 10
- hi
- Flickering map when using webview on a NOTHING phone HOT 25
- WebGLBaseTileLayerRenderer causes flickering when source or source key changes.
- Default Styles for Modifying Feature Broke in Upgrade from 8.2 to 9.0 HOT 9
- this.fill_.loading is not a function in ol/style/RegularShape.js HOT 1
- Reload individual tile HOT 2
- Type 'WebGLTileLayer' is not generic. HOT 1
- The rendering of highlighted stroke on the map is inconsistent HOT 2
- Add setter method for the View.projection_ field. HOT 3
- setOpacity on Vector Layer with 'declutter' set causes layer to disappear. HOT 3
- Move attributionsCollapsible to collapseAttributions HOT 1
- Add https://github.com/openlayers/openlayers/pull/15448 to breaking changes of OL `v9.0.0` HOT 2
- small (<256x256 size), multi-band, colored GeoTIFF fails to be displayed
- GML format always returns 3d geometries HOT 6
- WebGL rendering of large data sets is not without memory and performance issues (OpenLayers 9).. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openlayers.