<?xml version="1.0"?>
<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:five="http://namespaces.zope.org/five">

    <include package="Products.CMFCore" file="configure.zcml" />

    <browser:page
        name="collectivegeo-controlpanel"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.GeoControlpanel"
        layer=".interfaces.IGeoMapWidgetLayer"
        permission="cmf.ManagePortal"
        />

    <browser:page
        name="geosettings-view"
        for="*"
        class=".geosettings_view.GeoSettingsView"
        permission="zope2.View"
        />

    <browser:page
        name="geofeaturestyle-view"
        for="*"
        class=".geofeaturestyle_view.GeoFeatureStyleView"
        permission="zope2.View"
        />

    <browser:page
        name="collectivegeo-macros"
        for="*"
        class=".collectivegeo_macros.CollectiveGeoMacros"
        permission="zope2.View"
        />

    <browser:page
        name="collectivegeo-maps"
        for="*"
        class=".widget.MapView"
        permission="zope2.View"
        allowed_attributes="mapwidgets"
        />

    <!-- ..interfaces.IMapView -->
    <adapter
        for="zope.interface.Interface
             zope.interface.Interface
             zope.interface.Interface"
        factory=".widget.MapWidgets"
        />

    <!-- ..interfaces.IMapView -->
    <adapter
        for="zope.interface.Interface
             zope.interface.Interface
             zope.interface.Interface"
        factory=".widget.MapWidget"
        name="default-cgmap"
        />

    <adapter
        for="..interfaces.IMapView
             zope.interface.Interface
             zope.interface.Interface"
        factory=".controlpanel.ControlPanelMapWidget"
        name="geosettings-cgmap"
        />

    <!-- ..interfaces.IMapView -->
    <adapter
        for="zope.interface.Interface
             zope.interface.Interface
             zope.interface.Interface
             ..interfaces.IMapWidget"
        factory=".widget.MapLayers" />

    <adapter
        for="..interfaces.IMapView
             zope.interface.Interface
             zope.interface.Interface
             ..interfaces.IMapWidget"
        factory=".controlpanel.MarkerEditLayer"
        name="markeredit"
        />

    <browser:resource
        name="collectivegeo.png"
        file="collectivegeo.png"
        layer=".interfaces.IGeoMapWidgetLayer"
        />

    <browser:resource
        name="collectivegeo.js"
        file="collectivegeo.js"
        layer=".interfaces.IGeoMapWidgetLayer"
        />

    <!-- layers views -->
    <browser:page
        name="osm-layer"
        for="*"
        template="layers_templates/osm_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="bing_aer-layer"
        for="*"
        template="layers_templates/bing_aer_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="bing_hyb-layer"
        for="*"
        template="layers_templates/bing_hyb_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="bing_map-layer"
        for="*"
        template="layers_templates/bing_map_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="bing_rod-layer"
        for="*"
        template="layers_templates/bing_rod_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="google_hyb-layer"
        for="*"
        template="layers_templates/google_hyb_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="google_map-layer"
        for="*"
        template="layers_templates/google_map_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="google_sat-layer"
        for="*"
        template="layers_templates/google_sat_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="google_ter-layer"
        for="*"
        template="layers_templates/google_ter_layer.pt"
        permission="zope.Public"
    />

    <browser:page
        name="yahoo_hyb-layer"
        for="*"
        template="layers_templates/yahoo_hyb_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="yahoo_map-layer"
        for="*"
        template="layers_templates/yahoo_map_layer.pt"
        permission="zope.Public"
        />

    <browser:page
        name="yahoo_sat-layer"
        for="*"
        template="layers_templates/yahoo_sat_layer.pt"
        permission="zope.Public"
        />

</configure>
