[mapserver-users] Can't add external vector tile layer source to mapfile

Benedek Petrovicz benedek.petrovicz at gmail.com
Fri Jan 28 04:02:50 PST 2022


Hi!

I'm trying to add an MVT layer to my Mapfile, but it doesn't work and I ran
out of ideas. Some info about the layer I'm trying to add:
https://support.regrid.com/articles/using-the-tileserver/

This is my LAYER definition in my Mapfile *(based on the guidance of
https://gdal.org/drivers/vector/mvt.html
<https://gdal.org/drivers/vector/mvt.html> and
https://mapserver.org/input/vector/ogr.html
<https://mapserver.org/input/vector/ogr.html>)*

LAYER
    NAME "Parcel"
    TYPE POLYGON
    CONNECTIONTYPE OGR
    CONNECTION "MVT:https://tiles.regrid.com/api/v1/parcels/{z}"
    DATA "parcels"
    STATUS ONEND

By debugging the layer I get the following logs:

[Thu Dec 30 12:17:42 2021].906000
msOGRFileOpen(MVT:https://tiles.regrid.com/api/v1/parcels/{z})...
[Thu Dec 30 12:17:42 2021].906000
OGROPen(MVT:https://tiles.regrid.com/api/v1/parcels/{z})
[Thu Dec 30 12:17:43 2021].133000 msOGRFileOpen(): OGR error. Open
failed for OGR connection in layer `Parcel'.
File not found or unsupported format. Check server logs.
[Thu Dec 30 12:17:43 2021].133000 msDrawMap(): Image handling error.
Failed to draw layer named 'Parcel'.
[Thu Dec 30 12:17:43 2021].134000 freeLayer(): freeing layer at 01012900.

I'm expecting this to work because the following ogrinfo command runs
without any issues:

ogrinfo "MVT:https://tiles.regrid.com/api/v1/parcels/14/3579/6522.mvt" parcels

I couldn't find a single example online about adding an MVT layer to a
Mapfile.

Is there anyone who could prompt me in the right direction or just have a
working example?

Thank you
Petrovicz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220128/670c3a36/attachment.htm>


More information about the MapServer-users mailing list