[mapserver-users] MapScript EntryPointNotFoundException 'CSharp_MS_LABEL_ALLOCSIZE_get'
Hi, I am upgrading a website with MapServer 5.6 to 6.2. Website was made in Visual Studio using MapScript. After some adjustments I got it running in Visual Studio. But when I publish the website on a server with IIS 7.5 the following error appears: Error in initMapJ: System.TypeInitializationException: The type initializer for 'OSGeo.MapServer.mapscript' threw an exception. --- System.EntryPointNotFoundException: Unable to find an entry point named 'CSharp_MS_LABEL_ALLOCSIZE_get' in DLL 'mapscript'. at OSGeo.MapServer.mapscriptPINVOKE.MS_LABEL_ALLOCSIZE_get() at OSGeo.MapServer.mapscript..cctor() --- End of inner exception stack trace --- In initMapJ the mapObj is created/mapfile opened. The error appears at moment that a layer object is read. I have no idea where to look. I tried removing all label settings from the mapfile. But I thinks it something else. Any suggestions/ideas? Thank, Hans Wapenaar ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapScript EntryPointNotFoundException 'CSharp_MS_LABEL_ALLOCSIZE_get'
Hans, You probably have an older version on mapscript dll available in the PATH which is loaded at run time instead of the correct version. Make sure mapscript_csharp.dll loads the proper version of mapscript.dll. Best regards, Tamas 2013/3/20 Hans Wapenaar (GIS Innovations) hans.wapen...@gis-innovations.nl Hi, ** ** I am upgrading a website with MapServer 5.6 to 6.2. Website was made in Visual Studio using MapScript. After some adjustments I got it running in Visual Studio. But when I publish the website on a server with IIS 7.5 the following error appears: ** ** Error in initMapJ: System.TypeInitializationException: The type initializer for 'OSGeo.MapServer.mapscript' threw an exception. --- System.EntryPointNotFoundException: Unable to find an entry point named 'CSharp_MS_LABEL_ALLOCSIZE_get' in DLL 'mapscript'. at OSGeo.MapServer.mapscriptPINVOKE.MS_LABEL_ALLOCSIZE_get() at OSGeo.MapServer.mapscript..cctor() --- End of inner exception stack trace --- ** ** In initMapJ the mapObj is created/mapfile opened. The error appears at moment that a layer object is read. ** ** I have no idea where to look. I tried removing all label settings from the mapfile. But I thinks it something else. Any suggestions/ideas? ** ** Thank, Hans Wapenaar ** ** ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapScript EntryPointNotFoundException 'CSharp_MS_LABEL_ALLOCSIZE_get'
Hi Tamas, Thanks for your reaction. You were right that there was some kind of conflict in versions. But not with the PATH setting. On my server configuration it is required to use that. Problem was in the temporary files. I used a site that contained the old mapscript version before, The dotNet framework creates temporary files and directories for a website. Probably the mapscript dll’s were not automatically replaced in the temp dirs also not after resetting the website. Removing the temp dirs solved the issue. As simple as that! Thanks, Hans Van: Tamas Szekeres [mailto:szeker...@gmail.com] Verzonden: woensdag 20 maart 2013 12:49 Aan: Hans Wapenaar (GIS Innovations) CC: mapserver-users@lists.osgeo.org Onderwerp: Re: [mapserver-users] MapScript EntryPointNotFoundException 'CSharp_MS_LABEL_ALLOCSIZE_get' Hans, You probably have an older version on mapscript dll available in the PATH which is loaded at run time instead of the correct version. Make sure mapscript_csharp.dll loads the proper version of mapscript.dll. Best regards, Tamas 2013/3/20 Hans Wapenaar (GIS Innovations) hans.wapen...@gis-innovations.nl Hi, I am upgrading a website with MapServer 5.6 to 6.2. Website was made in Visual Studio using MapScript. After some adjustments I got it running in Visual Studio. But when I publish the website on a server with IIS 7.5 the following error appears: Error in initMapJ: System.TypeInitializationException: The type initializer for 'OSGeo.MapServer.mapscript' threw an exception. --- System.EntryPointNotFoundException: Unable to find an entry point named 'CSharp_MS_LABEL_ALLOCSIZE_get' in DLL 'mapscript'. at OSGeo.MapServer.mapscriptPINVOKE.MS_LABEL_ALLOCSIZE_get() at OSGeo.MapServer.mapscript..cctor() --- End of inner exception stack trace --- In initMapJ the mapObj is created/mapfile opened. The error appears at moment that a layer object is read. I have no idea where to look. I tried removing all label settings from the mapfile. But I thinks it something else. Any suggestions/ideas? Thank, Hans Wapenaar ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] query creation issues
Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for your map interface # (Created with PyQgis MapServer Export plugin) MAP NAME QGIS-MAP # Map image size SIZE 500 500 UNITS meters EXTENT -240 -90 310 400 FONTSET /wwwroot/fonts/fontset.txt SYMBOLSET /wwwroot/symbols/symbols.sty PROJECTION proj=lcc ellps=GRS80 lat_0=49 lon_0=-95 lat_1=49 lat_2=77 datum=NAD83 units=m no_defs END # Background color for the map canvas -- change as desired IMAGECOLOR 0 100 250 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH /ms4w/tmp/ms_tmp/ # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL /ms_tmp/ # WMS server settings METADATA 'ows_title' 'QGIS-MAP' 'ows_onlineresource' 'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'C:/wwwroot/M_Mirrlees_Assign3/global.html' END SCALEBAR STATUS EMBED UNITS KILOMETERS INTERVALS 3 TRANSPARENT TRUE OUTLINECOLOR 0 0 0 END # End for scalebar QUERYMAP STATUS ON # sets the map to be queryable STYLE HILITE # the selected object is highligthed END # End for QueryMap WEB TEMPLATE global.html IMAGEPATH /ms4w/tmp/ms_tmp/ IMAGEURL /ms_tmp/ HEADER/maps/M_Mirrlees_assign3/header.html FOOTERmaps/M_Mirrlees_assign3/footer.html EMPTY /maps/M_Mirrlees_Assign3/blank.html END #End for WEB LAYER NAME 'mjrroads' TYPE LINE DUMP false EXTENT -143.210462 39.001401 -50.461045 85.911094 DATA '../data/mjrroads.shp' METADATA 'ows_title' 'mjrroads' END STATUS default TRANSPARENCY 100 PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASSITEM 'TYPE' CLASS NAME default EXPRESSION STYLE WIDTH 0.91 COLOR 201 157 32 END END CLASS NAME TYPE = Expressway EXPRESSION Expressway STYLE WIDTH 2.0 COLOR 255 0 0 END END CLASS NAME TYPE = Primary Highway EXPRESSION Primary Highway MAXSCALEDENOM 250 STYLE WIDTH 1.0 COLOR 0 0 0 END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW?
I've now got labels on my maps when zoomed out but my polygons have no labels if I zoom in away from the label location. I'm using: PROCESSING LABEL_NO_CLIP=True Is this a fixable problem? Are there any examples of getting labels with mapserver and openlayers using tiles and multiple overlay layers? I'm still experimenting but still confused. Any help would be appreciated. Thanks, Worth _ From: Worth Lutz [mailto:w...@mindspring.com] Sent: Tuesday, March 19, 2013 3:39 PM To: 'Donald Kerr'; 'mapserver-users@lists.osgeo.org' Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Donald, How does the change to TYPE POINT work for polygon shapes or do you just change that to TYPE POLYGON and only have a label in the CLASS block? I'm still confused on how to manage labels on multiple overlay layers. That may be a long term project for my application. I was hoping for a simple solution. I did figure out that putting PROCESSING LABEL_NO_CLIP=True in my layer fixed some of my problems of multiple labels with many clipped. Thanks for your help, Worth _ From: Donald Kerr [mailto:donald.k...@dkerr.co.uk] Sent: Tuesday, March 19, 2013 3:29 PM To: 'Worth Lutz'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Worth, I have replaced TYPE ANNOTATION with TYPE POINT and all is working well. As for tiling and labels, I have not found a satisfactory solution at all and have accepted that I am getting partial labels or no labels it the label starts in another tile - See here: https://github.com/mapserver/mapserver/issues/4284 What I have done is offered an option of Single Tile for users so that they can switch between tiled and not. The tiled option gives a better OpenLayers slippy map experience but the single tile option allows for accurate and complete labelling. Regards, Donald From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Worth Lutz Sent: 19 March 2013 14:52 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Hi all, I'm changing my usage of mapserver from a single map image to using OpenLayers and having MapServer work as a WMS server. My problem is labels. There seem to be too many variables (in MapServer and OpenLayers) and I cannot figure out which to set to keep from having partial labels, too many labels or overlapping labels. What is the best way to approach labels in a tiled / overlay environment. I noticed that in MapServer 6.0 the annotation layer type is deprecated. What is the method for replacing this? In summary, I'm LOST. Anyone with a map, please point me in the right direction. :-) Thanks, Worth _ No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6188 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW?
On 20 March 2013 17:49, Worth Lutz w...@mindspring.com wrote: I’ve now got labels on my maps when zoomed out but my polygons have no labels if I zoom in away from the label location. I’m using: PROCESSING “LABEL_NO_CLIP=True” Is this a fixable problem? That's the aim of LABEL_NO_CLIP, i.e. only label a polygon at a single geographical location to prevent the label from a single polygon appearing on every tile if that polygon spans multiple tiles. YMMV, but you might want to remove LABEL_NO_CLIP and use metatiles on your tile cache (e,g: with a 2x2 metatile, your label would only be rendered in one of every 4 tiles). If you aren't using a tile cache, then there's no easy solution I know of. Are there any examples of getting labels with mapserver and openlayers using tiles and multiple overlay layers? If you're using multiple label overlays, there's no way to control collision between the labels from different layers. I’m still experimenting but still confused. Any help would be appreciated. Thanks, Worth From: Worth Lutz [mailto:w...@mindspring.com] Sent: Tuesday, March 19, 2013 3:39 PM To: 'Donald Kerr'; 'mapserver-users@lists.osgeo.org' Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Donald, How does the change to “TYPE POINT” work for polygon shapes or do you just change that to “TYPE POLYGON” and only have a label in the “CLASS” block? I’m still confused on how to manage labels on multiple overlay layers. That may be a long term project for my application. I was hoping for a simple solution. I did figure out that putting PROCESSING “LABEL_NO_CLIP=True” in my layer fixed some of my problems of multiple labels with many clipped. Thanks for your help, Worth From: Donald Kerr [mailto:donald.k...@dkerr.co.uk] Sent: Tuesday, March 19, 2013 3:29 PM To: 'Worth Lutz'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Worth, I have replaced “TYPE ANNOTATION” with “TYPE POINT” and all is working well. As for tiling and labels, I have not found a satisfactory solution at all and have accepted that I am getting partial labels or no labels it the label starts in another tile - See here: https://github.com/mapserver/mapserver/issues/4284 What I have done is offered an option of “Single Tile” for users so that they can switch between tiled and not. The tiled option gives a better OpenLayers slippy map experience but the single tile option allows for accurate and complete labelling. Regards, Donald From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Worth Lutz Sent: 19 March 2013 14:52 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Hi all, I’m changing my usage of mapserver from a single map image to using OpenLayers and having MapServer work as a WMS server. My problem is labels. There seem to be too many variables (in MapServer and OpenLayers) and I cannot figure out which to set to keep from having partial labels, too many labels or overlapping labels. What is the best way to approach labels in a tiled / overlay environment. I noticed that in MapServer 6.0 the “annotation” layer type is deprecated. What is the method for replacing this? In summary, I’m LOST. Anyone with a map, please point me in the right direction. J Thanks, Worth No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6188 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] query creation issues
Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for your map interface # (Created with PyQgis MapServer Export plugin) MAP NAME QGIS-MAP # Map image size SIZE 500 500 UNITS meters EXTENT -240 -90 310 400 FONTSET /wwwroot/fonts/fontset.txt SYMBOLSET /wwwroot/symbols/symbols.sty PROJECTION proj=lcc ellps=GRS80 lat_0=49 lon_0=-95 lat_1=49 lat_2=77 datum=NAD83 units=m no_defs END # Background color for the map canvas -- change as desired IMAGECOLOR 0 100 250 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH /ms4w/tmp/ms_tmp/ # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL /ms_tmp/ # WMS server settings METADATA 'ows_title' 'QGIS-MAP' 'ows_onlineresource' 'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'C:/wwwroot/M_Mirrlees_Assign3/global.html' END SCALEBAR STATUS EMBED UNITS KILOMETERS INTERVALS 3 TRANSPARENT TRUE OUTLINECOLOR 0 0 0 END # End for scalebar QUERYMAP STATUS ON # sets the map to be queryable STYLE HILITE # the selected object is highligthed END # End for QueryMap WEB TEMPLATE global.html IMAGEPATH /ms4w/tmp/ms_tmp/ IMAGEURL /ms_tmp/ HEADER /maps/M_Mirrlees_assign3/header.html FOOTER maps/M_Mirrlees_assign3/footer.html EMPTY /maps/M_Mirrlees_Assign3/blank.html END #End for WEB LAYER NAME 'mjrroads' TYPE LINE DUMP false EXTENT -143.210462 39.001401 -50.461045 85.911094 DATA '../data/mjrroads.shp' METADATA 'ows_title' 'mjrroads' END STATUS default TRANSPARENCY 100 PROJECTION 'proj=longlat' 'datum=WGS84' 'no_defs' END CLASSITEM 'TYPE' CLASS NAME default EXPRESSION STYLE WIDTH 0.91 COLOR 201 157 32 END END CLASS NAME TYPE = Expressway EXPRESSION Expressway STYLE WIDTH 2.0 COLOR 255 0 0 END END CLASS NAME TYPE = Primary Highway EXPRESSION Primary Highway MAXSCALEDENOM 250 STYLE WIDTH 1.0 COLOR 0 0 0 END END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW?
Ok, I'm beginning to understand all the many variables. I have a mapcache which is turned off at the moment as I was trying to work on styling. For example, change one thing and redraw. Change it again to figure out what is going on. I plan on using mapcache, so if I use metatiles I then use a gutter/buffer around the metatile and that eliminates the clipping on the edges of the metatile? I think I'm putting the pieces together now! Worth -Original Message- From: thomas bonfort [mailto:thomas.bonf...@gmail.com] Sent: Wednesday, March 20, 2013 12:59 PM To: Worth Lutz Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? On 20 March 2013 17:49, Worth Lutz w...@mindspring.com wrote: I've now got labels on my maps when zoomed out but my polygons have no labels if I zoom in away from the label location. I'm using: PROCESSING LABEL_NO_CLIP=True Is this a fixable problem? That's the aim of LABEL_NO_CLIP, i.e. only label a polygon at a single geographical location to prevent the label from a single polygon appearing on every tile if that polygon spans multiple tiles. YMMV, but you might want to remove LABEL_NO_CLIP and use metatiles on your tile cache (e,g: with a 2x2 metatile, your label would only be rendered in one of every 4 tiles). If you aren't using a tile cache, then there's no easy solution I know of. Are there any examples of getting labels with mapserver and openlayers using tiles and multiple overlay layers? If you're using multiple label overlays, there's no way to control collision between the labels from different layers. I'm still experimenting but still confused. Any help would be appreciated. Thanks, Worth From: Worth Lutz [mailto:w...@mindspring.com] Sent: Tuesday, March 19, 2013 3:39 PM To: 'Donald Kerr'; 'mapserver-users@lists.osgeo.org' Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Donald, How does the change to TYPE POINT work for polygon shapes or do you just change that to TYPE POLYGON and only have a label in the CLASS block? I'm still confused on how to manage labels on multiple overlay layers. That may be a long term project for my application. I was hoping for a simple solution. I did figure out that putting PROCESSING LABEL_NO_CLIP=True in my layer fixed some of my problems of multiple labels with many clipped. Thanks for your help, Worth From: Donald Kerr [mailto:donald.k...@dkerr.co.uk] Sent: Tuesday, March 19, 2013 3:29 PM To: 'Worth Lutz'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Worth, I have replaced TYPE ANNOTATION with TYPE POINT and all is working well. As for tiling and labels, I have not found a satisfactory solution at all and have accepted that I am getting partial labels or no labels it the label starts in another tile - See here: https://github.com/mapserver/mapserver/issues/4284 What I have done is offered an option of Single Tile for users so that they can switch between tiled and not. The tiled option gives a better OpenLayers slippy map experience but the single tile option allows for accurate and complete labelling. Regards, Donald From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Worth Lutz Sent: 19 March 2013 14:52 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Hi all, I'm changing my usage of mapserver from a single map image to using OpenLayers and having MapServer work as a WMS server. My problem is labels. There seem to be too many variables (in MapServer and OpenLayers) and I cannot figure out which to set to keep from having partial labels, too many labels or overlapping labels. What is the best way to approach labels in a tiled / overlay environment. I noticed that in MapServer 6.0 the annotation layer type is deprecated. What is the method for replacing this? In summary, I'm LOST. Anyone with a map, please point me in the right direction. J Thanks, Worth No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6188 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users - No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6189 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org
Re: [mapserver-users] query creation issues
Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... Name Type Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td /td td/td /tr Thanks,Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for your map interface # (Created with PyQgis MapServer Export plugin) MAP NAME QGIS-MAP # Map image size SIZE 500 500 UNITS meters EXTENT -240 -90 310 400 FONTSET /wwwroot/fonts/fontset.txt SYMBOLSET /wwwroot/symbols/symbols.sty PROJECTION proj=lcc ellps=GRS80 lat_0=49 lon_0=-95 lat_1=49 lat_2=77 datum=NAD83 units=m no_defs END # Background color for the map canvas -- change as desired IMAGECOLOR 0 100 250 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH /ms4w/tmp/ms_tmp/ # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL /ms_tmp/ # WMS server settings METADATA 'ows_title' 'QGIS-MAP' 'ows_onlineresource' 'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'C:/wwwroot/M_Mirrlees_Assign3/global.html' END SCALEBAR STATUS EMBED UNITS KILOMETERS INTERVALS 3 TRANSPARENT TRUE OUTLINECOLOR 0 0 0 END # End for scalebar QUERYMAP STATUS ON # sets the map to be queryable STYLE HILITE # the selected object is highligthed END # End for QueryMap WEB TEMPLATE global.html IMAGEPATH /ms4w/tmp/ms_tmp/ IMAGEURL /ms_tmp/ HEADER /maps/M_Mirrlees_assign3/header.html
Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW?
If you're using mapcache, turn *off* any openlayers gutter. In your mapcache.xml config file, set a tileset-metabuffer to a few pixels, and set your mapfile's labelcache_map_egde_buffer to exactly that same value. Any other configuration may result in labels appearing truncated in the openlayer tile'd map. -- thomas On 20 March 2013 18:10, Worth Lutz w...@mindspring.com wrote: Ok, I'm beginning to understand all the many variables. I have a mapcache which is turned off at the moment as I was trying to work on styling. For example, change one thing and redraw. Change it again to figure out what is going on. I plan on using mapcache, so if I use metatiles I then use a gutter/buffer around the metatile and that eliminates the clipping on the edges of the metatile? I think I'm putting the pieces together now! Worth -Original Message- From: thomas bonfort [mailto:thomas.bonf...@gmail.com] Sent: Wednesday, March 20, 2013 12:59 PM To: Worth Lutz Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? On 20 March 2013 17:49, Worth Lutz w...@mindspring.com wrote: I've now got labels on my maps when zoomed out but my polygons have no labels if I zoom in away from the label location. I'm using: PROCESSING LABEL_NO_CLIP=True Is this a fixable problem? That's the aim of LABEL_NO_CLIP, i.e. only label a polygon at a single geographical location to prevent the label from a single polygon appearing on every tile if that polygon spans multiple tiles. YMMV, but you might want to remove LABEL_NO_CLIP and use metatiles on your tile cache (e,g: with a 2x2 metatile, your label would only be rendered in one of every 4 tiles). If you aren't using a tile cache, then there's no easy solution I know of. Are there any examples of getting labels with mapserver and openlayers using tiles and multiple overlay layers? If you're using multiple label overlays, there's no way to control collision between the labels from different layers. I'm still experimenting but still confused. Any help would be appreciated. Thanks, Worth From: Worth Lutz [mailto:w...@mindspring.com] Sent: Tuesday, March 19, 2013 3:39 PM To: 'Donald Kerr'; 'mapserver-users@lists.osgeo.org' Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Donald, How does the change to TYPE POINT work for polygon shapes or do you just change that to TYPE POLYGON and only have a label in the CLASS block? I'm still confused on how to manage labels on multiple overlay layers. That may be a long term project for my application. I was hoping for a simple solution. I did figure out that putting PROCESSING LABEL_NO_CLIP=True in my layer fixed some of my problems of multiple labels with many clipped. Thanks for your help, Worth From: Donald Kerr [mailto:donald.k...@dkerr.co.uk] Sent: Tuesday, March 19, 2013 3:29 PM To: 'Worth Lutz'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Worth, I have replaced TYPE ANNOTATION with TYPE POINT and all is working well. As for tiling and labels, I have not found a satisfactory solution at all and have accepted that I am getting partial labels or no labels it the label starts in another tile - See here: https://github.com/mapserver/mapserver/issues/4284 What I have done is offered an option of Single Tile for users so that they can switch between tiled and not. The tiled option gives a better OpenLayers slippy map experience but the single tile option allows for accurate and complete labelling. Regards, Donald From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Worth Lutz Sent: 19 March 2013 14:52 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] LABELS - changing from single map to tiles and overlays - HOW? Hi all, I'm changing my usage of mapserver from a single map image to using OpenLayers and having MapServer work as a WMS server. My problem is labels. There seem to be too many variables (in MapServer and OpenLayers) and I cannot figure out which to set to keep from having partial labels, too many labels or overlapping labels. What is the best way to approach labels in a tiled / overlay environment. I noticed that in MapServer 6.0 the annotation layer type is deprecated. What is the method for replacing this? In summary, I'm LOST. Anyone with a map, please point me in the right direction. J Thanks, Worth No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6188 - Release Date: 03/19/13
Re: [mapserver-users] query creation issues
You need to refer to the attributes next... trtd[NAME]/tdtd[TYPE]/td/tr Steve From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 12:16 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... Name Type Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[maphttp://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=%5bshpidx%5dshpext=%5bshpext_esc%5dmapext=shapemap=%5bmap]-- tr td /td td/td /tr Thanks, Mark From: steve.l...@state.mn.usmailto:steve.l...@state.mn.us To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for your map interface # (Created with PyQgis MapServer Export plugin) MAP NAME QGIS-MAP # Map image size SIZE 500 500 UNITS meters EXTENT -240 -90 310 400 FONTSET /wwwroot/fonts/fontset.txt SYMBOLSET /wwwroot/symbols/symbols.sty PROJECTION proj=lcc ellps=GRS80 lat_0=49 lon_0=-95 lat_1=49 lat_2=77 datum=NAD83 units=m no_defs END # Background color for the map canvas -- change as desired IMAGECOLOR 0 100 250 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH /ms4w/tmp/ms_tmp/ # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL /ms_tmp/ # WMS server settings METADATA 'ows_title' 'QGIS-MAP' 'ows_onlineresource' 'localhost.com/cgi-bin/mapserv.exe?map=C:/wwwroot/M_Mirrlees_Assign3/global.map' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate #
Re: [mapserver-users] query creation issues
Hi Steve, Unfortunately that didn't work! But I did manage to get the ID chracteristic outputted as I forgot to include that previously. As when I went to edit the query.html page it shows this ID Name Type 1275 [name] [type] Here is the code that is causing issues for me... !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr While this is the code for the header... !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr As what i'm trying to do is get the name (name of road outputted) and the type (either expressway or major road) Thanks,MarkFrom: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 18:22:29 + You need to refer to the attributes next… trtd[NAME]/tdtd[TYPE]/td/tr Steve From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 12:16 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... Name Type Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td /td td/td /tr Thanks, Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for your map interface # (Created with PyQgis MapServer Export plugin) MAP NAME QGIS-MAP # Map image size SIZE 500 500 UNITS meters EXTENT -240 -90 310 400 FONTSET /wwwroot/fonts/fontset.txt SYMBOLSET /wwwroot/symbols/symbols.sty PROJECTION proj=lcc ellps=GRS80 lat_0=49 lon_0=-95 lat_1=49 lat_2=77 datum=NAD83
Re: [mapserver-users] query creation issues
Straight item tags like that ARE case sensitive. Try [item name=name] and [item name=type] instead. From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 1:33 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Unfortunately that didn't work! But I did manage to get the ID chracteristic outputted as I forgot to include that previously. As when I went to edit the query.html page it shows this ID Name Type 1275 [name] [type] Here is the code that is causing issues for me... !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[maphttp://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=%5bshpidx%5dshpext=%5bshpext_esc%5dmapext=shapemap=%5bmap]-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr While this is the code for the header... !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr As what i'm trying to do is get the name (name of road outputted) and the type (either expressway or major road) Thanks, Mark From: steve.l...@state.mn.usmailto:steve.l...@state.mn.us To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 18:22:29 + You need to refer to the attributes next... trtd[NAME]/tdtd[TYPE]/td/tr Steve From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 12:16 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... Name Type Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map]http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=%5bshpidx%5dshpext=%5bshpext_esc%5dmapext=shapemap=%5bmap%5d-- tr td /td td/td /tr Thanks, Mark From: steve.l...@state.mn.usmailto:steve.l...@state.mn.us To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the
Re: [mapserver-users] query creation issues
On 3/20/2013 2:32 PM, Mark Mirrlees wrote: Hi Steve, Unfortunately that didn't work! But I did manage to get the ID chracteristic outputted as I forgot to include that previously. As when I went to edit the query.html page it shows this ID NameType 1275 [name] [type] Here is the code that is causing issues for me... !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr Attribute binding is case sensitive. For shapefiles it should be UPPERCASE and for postgis it should be lowercase. Also, you tags are not nested correctly, you have a tr nested inside a tr. :-O -Steve W While this is the code for the header... !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr As what i'm trying to do is get the name (name of road outputted) and the type (either expressway or major road) Thanks, Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 18:22:29 + You need to refer to the attributes next… trtd[NAME]/tdtd[TYPE]/td/tr Steve *From:*Mark Mirrlees [mailto:mmirrl...@hotmail.com] *Sent:* Wednesday, March 20, 2013 12:16 PM *To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] query creation issues Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... *Name* *Type* Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td /td td/td /tr Thanks, Mark From: steve.l...@state.mn.us mailto:steve.l...@state.mn.us To:mmirrl...@hotmail.com mailto:mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3- Make layers queryable by adding something like: TEMPLATE 'void' 4- Write your template, for example my-template.html might look like: --- snip --- !-- MapServer Template -- This is my template:br/ [resultset layer=mjrroads] [feature]bType/b: [TYPE][/feature] [/resultset] Done presenting layers. --- snip --- Steve From:mapserver-users-boun...@lists.osgeo.org mailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 10:45 AM To:mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] query creation issues Hello everyone, I'm trying to create a query so I can query the roads/expressways from the map. I'm pretty sure I have created the headers and footers correctly but not sure...regardless i'm not entirely too sure where to stick the particular code in my .map file (shown below). I have bolded the code that I'm trying to incorporate into the .map file but not sure why it's not working. Thanks Mark # Map file created from QGIS project file C:/wwwroot/M_Mirrlees_Assign3/markassign3.qgs # Edit this file to customize for
[mapserver-users] Noob questions: configuring mapserver rpms on Fedora/CentOS machines
Greetings, I've become somewhat deft in using Q-GIS, PostGIS, along w/ PostgreSQL. I'm now set on moving into the Mapserver realm. At the risk of alienating the mature constituency of this list, I have some basic configuration questions. I have mapserver rpms installed on a Fedora 18 system. Mapserver binaries are placed in /usr/bin and /usr/sbin directories. What is the preferred (and more elegant) way of putting relevant binaries into the referenced Apache cgi-bin directory: symbolic links? or copying the binaries into the /var/www/cgi-bin directory? Or is there yet another alternative? One foreseeable issue is the maintenance/updating of binaries via RPM. Much thanks, Max Pyziur p...@brama.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] query creation issues
Hi there, Ok I managed to get this outputted...but under the [name] and [type] I need to get these fields populated from the query of the mjrroads... IDNameType1164[name][type] Code from mjrroadsquery.html!-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td td[name]/td td[type]/td /tr Now if I change the [name] to [map] in the mjrroadsquery.html I get the following... ID Name Type 1164 /wwwroot/M_Mirrlees_Assign3/global.map [type] Code from mjrroads.html !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr All i'm trying to do is get the Name and Type fields to be showing the name of the road, and the type of the road. Thanks,Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 18:41:52 + Straight item tags like that ARE case sensitive. Try [item name=”name”] and [item name=”type”] instead. From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 1:33 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Unfortunately that didn't work! But I did manage to get the ID chracteristic outputted as I forgot to include that previously. As when I went to edit the query.html page it shows this ID Name Type 1275 [name] [type] Here is the code that is causing issues for me... !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr While this is the code for the header... !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr As what i'm trying to do is get the name (name of road outputted) and the type (either expressway or major road) Thanks, Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 18:22:29 + You need to refer to the attributes next… trtd[NAME]/tdtd[TYPE]/td/tr Steve From: Mark Mirrlees [mailto:mmirrl...@hotmail.com] Sent: Wednesday, March 20, 2013 12:16 PM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Hi Steve, Thanks for your help. I've managed to get the query outputted. I have a couple of additional questions...after creating my query I need the footer to show the name and the type (based on the shapefile information), as based on the footer.html below !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thName/th thType/th /tr As when I launch my query it only shows... Name Type Based on readings from the mapserver website, it looks like I have to edit the query.html to make this populated...but not sure where (global.map file?) I can get this information that is supposed to go between the td and /td tags. !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td /td td/td /tr Thanks, Mark From: steve.l...@state.mn.us To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Date: Wed, 20 Mar 2013 17:00:47 + Hi Mark: Personally I'd steer you to the simplified query templates as described here: http://mapserver.org/development/rfc/ms-rfc-36.html This allows you to put everything in one place and better separates data from presentation. No more header/footer's. Plus you can have multiple presentations for the same layer. That said, the mapfile below doesn't have any queryable layers. There is no TEMPLATE defined for the one layer that is present. If you want to use the new style templating you'd do something like this: 1- Define an output format: OUTPUTFORMAT NAME 'my-template' DRIVER 'TEMPLATE' MIMETYPE 'text/html; subtype=compass' FORMATOPTION FILE=templates/my-template.html END 2- Optionally make it the default query format (otherwise you need to use qformat CGI parameter): WEB QUERYFORMAT 'my-template' ... END 3-
Re: [mapserver-users] Noob questions: configuring mapserver rpms on Fedora/CentOS machines
Max, See: http://mapserver.org/cgi/wrapper.html On 20 March 2013 14:03, Max Pyziur p...@brama.com wrote: Greetings, I've become somewhat deft in using Q-GIS, PostGIS, along w/ PostgreSQL. I'm now set on moving into the Mapserver realm. At the risk of alienating the mature constituency of this list, I have some basic configuration questions. I have mapserver rpms installed on a Fedora 18 system. Mapserver binaries are placed in /usr/bin and /usr/sbin directories. What is the preferred (and more elegant) way of putting relevant binaries into the referenced Apache cgi-bin directory: symbolic links? or copying the binaries into the /var/www/cgi-bin directory? Or is there yet another alternative? One foreseeable issue is the maintenance/updating of binaries via RPM. Much thanks, Max Pyziur p...@brama.com __**_ mapserver-users mailing list mapserver-users@lists.osgeo.**org mapserver-users@lists.osgeo.org http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] query creation issues
Does anyone have any updates on how to fix this? As I mentioned before I managed to get the ID field populated whenever I query the map but I need to get the same thing for the name of the road and the type of road... If there is anything else that you require please let me know as this is causing a great deal of confusion why it won't work! Thanks,Mark From: mmirrl...@hotmail.com To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org Date: Wed, 20 Mar 2013 14:53:57 -0400 Subject: Re: [mapserver-users] query creation issues Hi there, Ok I managed to get this outputted...but under the [name] and [type] I need to get these fields populated from the query of the mjrroads... IDNameType1164[name][type] Code from mjrroadsquery.html!-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td td[name]/td td[type]/td /tr Now if I change the [name] to [map] in the mjrroadsquery.html I get the following... ID Name Type 1164 /wwwroot/M_Mirrlees_Assign3/global.map [type] Code from mjrroads.html !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr All i'm trying to do is get the Name and Type fields to be showing the name of the road, and the type of the road. Thanks,Mark ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Limit caching for some zoom level only
Hi all, I would like to limit the caching for some levels (ex: 10 to 15) and fallback with the WMS request (without caching the tiles) for the other zoom level (ex: 0 to 9 and 16 to 19) I've try this in the config (using minzoom and maxzoom): tileset name=Ortho1948 sourceOrtho1948/source cachedisk/cache grid minzoom=10 maxzoom=15google/grid formatPNG/format metatile5 5/metatile metabuffer10/metabuffer expires3600/expires /tileset The tiles are generated for level 10 to 15 but for the other zoom level, the WMS is not called. Is it possible to configure mapcache to do that? regards, MartinO ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] query creation issues
Did you see this in Steve's email: layer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapema p=[map]-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr Attribute binding is case sensitive. For shapefiles it should be UPPERCASE and for postgis it should be lowercase. Also, you tags are not nested correctly, you have a tr nested inside a tr. :-O -Steve W Your data comes from shapefiles. You need to put name and type in upper case. [NAME] [TYPE] Worth _ From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 3:47 PM To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] query creation issues Does anyone have any updates on how to fix this? As I mentioned before I managed to get the ID field populated whenever I query the map but I need to get the same thing for the name of the road and the type of road... If there is anything else that you require please let me know as this is causing a great deal of confusion why it won't work! Thanks, Mark _ From: mmirrl...@hotmail.com To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org Date: Wed, 20 Mar 2013 14:53:57 -0400 Subject: Re: [mapserver-users] query creation issues Hi there, Ok I managed to get this outputted...but under the [name] and [type] I need to get these fields populated from the query of the mjrroads... ID Name Type 1164 [name] [type] Code from mjrroadsquery.html !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer= mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map]-- tr td[shpidx]/td td[name]/td td[type]/td /tr Now if I change the [name] to [map] in the mjrroadsquery.html I get the following... ID Name Type 1164 /wwwroot/M_Mirrlees_Assign3/global.map [type] Code from mjrroads.html !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr All i'm trying to do is get the Name and Type fields to be showing the name of the road, and the type of the road. Thanks, Mark _ No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6189 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] FOSS4G NA Program Announced, Early Bird Deadline April 1
Preliminary Program Announced! The Program Committee has announced the preliminary programhttp://foss4g-na.org/preliminary-program/. We received a lot of great abstracts and are excited about the quality and diversity of the program. Early Bird Deadline Just a reminder, the Early Bird deadline for registration is sneaking up on us very soon. Please make sure to register http://foss4gna.eventbrite.com/ by April 1st to get the discount rate! Sponsors We've got a great list of sponsors http://foss4g-na.org/sponsor/ lined up for the conference, but are certainly looking for more. Don't be left out in the cold on this opportunity! Many thanks to all those who have committed to sponsoring to date, this conference would not be possible without your support. Student/Mentor Opportunities If you are a student or a seasoned professional willing to act as a mentor, please check out our Student Opportunities pagehttp://foss4g-na.org/student-opportunities/ . Workshops The Minnesota GIS/LIS Consortium in collaboration with the FOSS4G North American Conference is pleased to present a diverse list of workshop offerings on Tuesday, May 21st, at the University of Minnesota Minneapolis (the day before the FOSS4G NA conference!). These workshops will encompass both open source and proprietary solutions. Registrationhttps://m360.mngislis.org/event.aspx?eventID=76603 for this event is handled by the Minnesota GIS/LIS Consortium. Visualizing Neighborhoods Hackathon The University of Minnesota Center for Urban and Regional Affairs and Open Twin Cities is scheduling a hackathon to coincide with FOSS4G NA and the Neighborhoods, USA conference that will also be in Minneapolis. *Visualizing Neighborhoods* http://visualizingneighborhoods-es2004.eventbrite.com/?rank=1is a day-long event to bring together neighborhood leaders, technologists, data visualizers, designers, artists, scientists, civil servants, and anyone else interested to explore how data can be used for research, analyzing, mapping, outreach, engagement, and communication in our neighborhoods. The goals are to start conversations, build community, experiment, and prototype projects for neighborhoods. -- David William Bitner FOSS4G North America 2013 Conference Chair dbSpatial LLC bit...@dbspatial.com 612-424-9932 -- David William Bitner ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] query creation issues
Hi there I guess I misread that! Thanks for everyone's help! As everything is working the way is needed! Mark Sent from my BlackBerry® powered by Virgin Mobile. -Original Message- From: Worth Lutz w...@mindspring.com Date: Wed, 20 Mar 2013 20:13:52 To: mmirrl...@hotmail.com; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] query creation issues Did you see this in Steve's email: layer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapema p=[map]-- tr td[shpidx]/td trtd[name]/td/tr trtd[type]/td/tr /tr Attribute binding is case sensitive. For shapefiles it should be UPPERCASE and for postgis it should be lowercase. Also, you tags are not nested correctly, you have a tr nested inside a tr. :-O -Steve W Your data comes from shapefiles. You need to put name and type in upper case. [NAME] [TYPE] Worth From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees Sent: Wednesday, March 20, 2013 3:47 PM To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] query creation issues Does anyone have any updates on how to fix this? As I mentioned before I managed to get the ID field populated whenever I query the map but I need to get the same thing for the name of the road and the type of road... If there is anything else that you require please let me know as this is causing a great deal of confusion why it won't work! Thanks, Mark From: mmirrl...@hotmail.com To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org Date: Wed, 20 Mar 2013 14:53:57 -0400 Subject: Re: [mapserver-users] query creation issues Hi there, Ok I managed to get this outputted...but under the [name] and [type] I need to get these fields populated from the query of the mjrroads... ID Name Type 1164 [name] [type] Code from mjrroadsquery.html !-- MapServer Template -- !--IMG src=http://[host]/cgi-bin/mapserv.exe?mode=INDEXQUERYqformat=png24qlayer=mjrroadsshapeindex=[shpidx]shpext=[shpext_esc]mapext=shapemap=[map];-- tr td[shpidx]/td td[name]/td td[type]/td /tr Now if I change the [name] to [map] in the mjrroadsquery.html I get the following... ID Name Type 1164 /wwwroot/M_Mirrlees_Assign3/global.map [type] Code from mjrroads.html !-- MapServer Template -- h3bLayer: Major Roads/b/h3 br INPUT NAME=img TYPE=image SRC=[img] width=500 height=500 border=0 ALT=Map Image table border=1 trnbsp;/td thID/th thName/th thType/th /tr All i'm trying to do is get the Name and Type fields to be showing the name of the road, and the type of the road. Thanks, Mark No virus found in this message. Checked by AVG - www.avg.com http://www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6189 - Release Date: 03/19/13 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users