Versions Compared

Key

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

...

In iShare GIS, if you have used one of the Selection tools to make a selection on the map, the Information Browser then displays the results. If you hover over an entry in the Information Browser with your mouse the specific feature will be highlighted on the map. The feature will be highlighted using the default style for the specific Geometry Type for the feature be it Polygon, Line or Point. From iShare V5.6.2 you now have the ability to customise, either the default feature highlighting or the individual feature highlighting for a specific Layer.

...

  • Navigate to the D:\Astun\iShareGIS\n.n\WebApps\WebService\SLD\selection folder where you will see three .xml files, one for each of the Geometry Types.
  • Copy one or all of the files, depending upon the Geometry Type of the Layer whose Feature highlighting you wish to customise, into the custom\SLD\selection folder e.g. D:\Astun\iShareGIS\n.n\WebApps\WebService\custom\SLD\selection. We recommend copying the file(s) to the custom folder before making any changes to prevent upgrading to a newer version of iShare reversing your changes.
  • Now open the xml file in a text editor such as Notepad++
  • We are now going to customise the feature highlighting for a specific Layer.
  • Copy the entire <NamedLayer> entry and paste it above below the existing default entry {layer_name}. In the following example we are changing the Polygon highlighting but the same applies to Line and Point e.g.

...

Code Block
titleCustomised Countries Layer
<StyledLayerDescriptor version="1.0.0">

  <NamedLayer>
    <Name>Countries<<Name>{layer_name}</Name>
    <UserStyle>
      <Name>Countries<<Name>{layer_name}</Name>
      <FeatureTypeStyle>
        <Rule>
          <Name>.</Name>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#FF0000<>#00FF00</CssParameter>
              <CssParameter name="fill-opacity">0.25</CssParameter>
            </Fill>
            <Stroke>
              <CssParameter name="stroke">#FF0000<>#00FF00</CssParameter>
              <CssParameter name="stroke-width">2</CssParameter>
              <CssParameter name="stroke-opacity">1</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
          <Filter xmlns:gml="http://www.opengis.net/gml">
            <PropertyIsEqualTo>
              <PropertyName>{unique_field}</PropertyName>
              <Literal>{unique_id}</Literal>
            </PropertyIsEqualTo>
          </Filter>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
   <NamedLayer>
    <Name>{layer_name}<<Name>Countries</Name>
    <UserStyle>
      <Name>{layer_name}<<Name>Countries</Name>
      <FeatureTypeStyle>
        <Rule>
          <Name>.</Name>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#00FF00<>#FF0000</CssParameter>
              <CssParameter name="fill-opacity">0.25</CssParameter>
            </Fill>
            <Stroke>
              <CssParameter name="stroke">#00FF00<>#FF0000</CssParameter>
              <CssParameter name="stroke-width">2</CssParameter>
              <CssParameter name="stroke-opacity">1</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
          <Filter xmlns:gml="http://www.opengis.net/gml">
            <PropertyIsEqualTo>
              <PropertyName>{unique_field}</PropertyName>
              <Literal>{unique_id}</Literal>
            </PropertyIsEqualTo>
          </Filter>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

...