The problem was that PostgreSQL/PostGIS, which is my backend, automatically converts geographicalName to geographicalname (unless you quote it) when the table is created. Using [geographicalname] instead of [geographicalName] works alright.
(for other readers: this was initially asked on Twitter, and I answered there at https://twitter.com/mapserving/status/1428728627076780036 )
Here is my mapfile that was used for that answer, that disables geometry for WMS GetFeatureInfo requests, and enables geometry for WFS GetFeature requests (see settings in LAYER "countries" metadata object):
Summary: It's quite a mess. The RT MapServer plugin is not well maintained (last commit 2015 e.g https://github.com/faunalia/rt_mapserver_exporter) and it requires Python Mapscript.
So the plugin should be working for Mapserver 6.4 series, maybe 6.6 when looking at releases date. The problem is that Mapscript version should match the Mapserver version and ...
Hi I'm the developer (and the company, GatewayGeo) behind the product that you're using, MS4W. First, glad to hear that you're using it! Sometimes positive feedback is hard to find in this world ha.
Some steps for you to tackle:
open in a text editor (Notepad++) the Apache error log: /ms4w/Apache/logs/error_log.txt
take a look at the contents and see if ...
You may try the following because as mentioned at https://mapserver.org/mapfile/class.html#mapfile-class-label
A class can contain multiple labels (since MapServer 6.2).
Expression that determines when the LABEL is to be applied. See EXPRESSION in CLASS.
I found out, that I missed the label-TAG with PropertyName:
@david-osipyan I used your question as the excuse needed to create new documentation for GeoJSON access in MapServer, with a new page visible now at: https://mapserver.org/input/vector/geojson.html
I hope that helps the next person coming along, in the MapServer community :)
By the way, it was so nice to read here in an earlier comment from you that MS4W is ...
What I had before was wrong:
I've now changed this to:
It has nothing to do with QGIS Server or MapServer but how these two sample servers are set up:
For both the CORS-Header 'Access-Control-Allow-Origin' is missing:
The browser console shows the following message:
I'm afraid the only thing you can do is to ask the server ...
I managed to get L.TileLayer.BetterWMS extension working with both WMS services.
First service https://ows.geo.hu-berlin.de/cgi-bin/qgis_mapserv.fcgi?request=GetCapabilities&service=WMS has only one CRS available, and that's unprojected EPSG:4326, so map has to be set to that one. Second problem with this service is CORS problem when requesting feature ...
That URL does not seem to be a WMS (or WMTS) server, but rather an ArcGIS Server mapservice. The IMAGESR parameter is specific for the ArcGIS export map function.
That said, the proxy seems to be configured in a way to block access to most of the ArcGIS Server REST api, and allowing only map images to be exported. This means that for instance, it is not ...
The upcoming MapServer 8.0 release will also accept "&TILED=TRUE" for WMS GetMap requests, which will allow you to specify in your mapfile's METADATA object a "tile_map_edge_buffer" parameter such as:
Read more about that upcoming ...
Look at the error message that tells that PostgreSQL/PostGIS does not have a ST_Force_2D("geom"). PostGIS does have another function with almost same name https://postgis.net/docs/ST_Force2D.html. The manual page has a note:
Changed: 2.1.0. Up to 2.0.x this was called ST_Force_2D.
It seems that your old MapServer version does not play together ...
Historically, MapServer was based on shapefiles, and thus still has the restriction that a single layer can draw only one geometry type.
If you want to draw both points and polygons, you need two layers.
(And you need to use queries to filter out the wrong geometries, because MapServer will happily draw the polygon nodes as points. Use something like ...
The described desired state got achieved by adding the following line in the mapfile. This has to be done per mapfile as there is no such default available just yet.
// ^ this line has to be added!
The result will be almost exactly as described in ...
For MS4W users on Windows, I've created the documentation (https://ms4w.com/README_INSTALL.html#fastcgi) for FastCGI, which gives more specific examples, such as:
and also points to the mod_fcgid page where each of ...
Your mapfile is mostly OK. I used the states.shp shapefile from the GeoServer demo data in my test and converted it into GeoJSON with ogr2ogr
ogr2ogr -f geojson geoJson.json states.shp
I checked with ogrinfo that my geoJson.json file contains a layer named "states" and used that in my mapfile. Other edits that I did are
edit EXTENT to be worldwide
When you are in CGI mode, you can use the &layers=all setting in the CGI request (and make sure that in your mapfile that each layer status is set to ON. Here is an example (and working) CGI request:
Since your mapfile has ...
SamTux's answer has a very complete example on serving WMTS layers with MapServer. You can also serve the layer directly by pointing the DATA to the WMTS Capabilities endpoint of the WMTS layer: