Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

First you need to locate the existing layer inside the MapServer .map file.

As you can see from the screenshot the DATA entry is pointing to the original shape file.

 

.map LAYER entry pointing to .shp fileImage RemovedImage Added

First you need to add an INCLUDE statement:

Code Block
INCLUDE "pgconnection.inc"

 

Now we need to update the DATA entry to reference the new location for the data.

Code Block
DATA "wkb_geometry from (select * fromschemaname.tablename as foo using unique ogc_fid using srid=2770"

 

where

wkb_geometry is the geometry field

ogc_fid is the unique numeric id field for the table

schemaname.tablename is the same as the table name entered for your Output when you loaded the data into Data Share in Step 1.

 

If there are any references to fields (CLASSITEM, LABELITEM etc.) then these will need to be updated to lowercase.

.map LAYER pointing to PostGISImage RemovedImage Added

In the above screenshot the old DATA entry has been left but has been commented out.

Now go to iShare and check image and popup displays for the layer.

In this example we can see that the fields are the old UPPERCASE surrounded with [] as we have not yet updated the MapSources.

iShare showing Polling StationsImage RemovedImage Added