Update .MAP file for Elgin Roadworks
Elgin Roadworks data no longer support
Due to changes to the API and data we are not currently supporting the Elgin System Connection. Please contact the Astun Support Portal if you require any further information.
This example assumes that the Elgin data is in PostgreSQL, with the connection information in an include file called datashare.inc. This is not entirely standard, but the important part here is the DATA string.
In this example we have included three different layer snippets for:
- Delays possible
- Delays unlikely
- Delays likely
This example assumes that there are the following three manatw symbols "mat at work" in the MapServer symbols file:
Image | Image Name | Snippet for .sym file | Image | Image Name | Snippet for .sym file |
---|---|---|---|---|---|
manatw-B.png | roadworks.png | ||||
manatw-G.png | roadworks_yellow.png | ||||
manatw-F.png | roadworks_orange.png |
We have also included some others if you should wish to use them. To configure iShare to use the attached symbols then you will need to:
- Save the image(s) to your E:\iShareData\LIVE\_MapServerConfig\CustomSymbols\mapicons\images folder.
- Add a link to these icons, using the above snippets, in your mapicon_abc.sym file (in the mapicons folder) where abc is what you have called your cut down copy of the mapicon.sym file,
- Now you may use these in your .map file LAYER as below.
For each Elgin Roadworks layer you wish to display you will need to add a LAYER entry into the .MAP file.
You may copy the following Snippets into your .MAP file using the Map Editor in Studio.
LAYER INCLUDE "datashare.inc" DATA "wkb_geometry from (select * from roadworks where impact = 'Delays possible') as foo using srid=27700 using unique ogc_fid" METADATA "qstring_validation_pattern" "." END NAME "roadworks_possible" STATUS OFF TYPE POINT UNITS METERS CLASS NAME "Delays possible" STYLE SYMBOL "manatw-F" END END END
LAYER INCLUDE "datashare.inc" DATA "wkb_geometry from (select * from roadworks where impact = 'Delays unlikely') as foo using srid=27700 using unique ogc_fid" METADATA "qstring_validation_pattern" "." END NAME "roadworks_unlikely" STATUS OFF TYPE POINT UNITS METERS CLASS NAME "Delays unlikely" STYLE SYMBOL "manatw-B" END END END
LAYER INCLUDE "datashare.inc" DATA "wkb_geometry from (select * from roadworks where impact = 'Delays likely') as foo using srid=27700 using unique ogc_fid" METADATA "qstring_validation_pattern" "." END NAME "roadworks_likely" STATUS OFF TYPE POINT UNITS METERS CLASS NAME "Delays likely" STYLE SYMBOL "manatw-G" END END END