<!--
FeatureImage - rasterizes feature data into an image layer.
-->

<Map name="Demo: FeatureImage Rasterizer">

    <xi:include href="readymap_imagery.xml"/>
    
    <OGRFeatures name="world-data">
        <url>../data/world.shp</url>
    </OGRFeatures>
    
    <FeatureImage name="Rasterized polygons + lines">
        <features>world-data</features>
        <styles>        
            <style type="text/css">
                default {
                    fill:          #ff7700;
                    stroke:        #ffff00;
                    stroke-width:  5km;
                }
            </style>
        </styles>
    </FeatureImage>
  
    <FeatureImage name="Rasterized points" min_level="5">
        <ogrfeatures url="../data/cities_mercator.shp"/>
        <styles>
            <script language="javascript">
              <![CDATA[
                function get_style() {
                    var rank = feature.properties.scalerank;
                    return "{ point-fill:#7f7fff;point-size:" + (rank*2.5) + "; }";
                }
              ]]>
            </script>
            <selector style_expr="get_style();"/>
        </styles>        
    </FeatureImage>
</Map>
