Step 2 - Update the .MAP files

You need to update any .map file that references the original shape file or, if you are adding new layers, you will need to add a new LAYER entry for the data.

 

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.

 

First you need to add an INCLUDE statement:

INCLUDE "pgconnection.inc"

 

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

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.

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.