[MS4W-Users] Help me reference an MVT layer from Mapfile
Brent Fraser
bfraser at geoanalytic.com
Mon Jan 3 20:20:40 UTC 2022
Your use-case is a little unusual. MVT format was intended to efficiently deliver vector information from a server to a mapping client, usually something like OpenLayers or Leaflet running in a browser. Is there a specific reason you want to have Mapserver read the data?
Brent
----------------------------------------
From: "Benedek Petrovicz" <benedek.petrovicz at gmail.com>
Sent: 1/3/22 1:08 PM
To: "Discussions for MS4W (MapServer for Windows)" <ms4w-users at lists.ms4w.com>
Cc: Brent Fraser <bfraser at geoanalytic.com>
Subject: Re: [MS4W-Users] Help me reference an MVT layer from Mapfile
No success yet, unfortunately.
Petrovicz
On Mon, Jan 3, 2022, 20:04 Brent Fraser <bfraser at geoanalytic.com> wrote:
Hi Petrovicz,
Have you had any success solving your problem?
Best regards,
Brent
Best Regards,
Brent FraserOn 2021-12-30 4:29 AM, Benedek Petrovicz via MS4W-Users wrote:
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 and 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 ON
END
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?
Thanks in advance
Petrovicz
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.ms4w.com
https://lists.ms4w.com/mailman/listinfo/ms4w-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20220103/d692b9f9/attachment-0001.htm>
More information about the MS4W-Users
mailing list