<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    i18n_domain="collective.geo.contentlocations">

  <i18n:registerTranslations directory="locales" />

  <include package="plone.z3cform" />
  <include package="collective.geo.geographer" />
  <include package="collective.geo.mapwidget" />

  <include package=".browser" />

  <include file="profiles.zcml" />

  <adapter
      factory='.indexer.collective_geo_styles'
      name='collective_geo_styles' />

  <subscriber
     handler=".events.reindexStylesSubscriber"
     for="collective.geo.contentlocations.events.IObjectStylesEvent" />

  <subscriber
     handler=".events.updateGeoObjects"
     for="collective.geo.settings.events.IGeoSettingsEvent" />

  <subscriber
    handler=".events.reindexDocSubscriber"
    for="collective.geo.geographer.event.IObjectGeoreferencedEvent"
  />


  <adapter
      for="collective.geo.geographer.interfaces.IGeoreferenceable"
      provides=".interfaces.IGeoManager"
      factory=".geomanager.GeoManager" />

  <adapter
    for="collective.geo.geographer.interfaces.IGeoreferenceable"
    provides="collective.geo.settings.interfaces.IGeoCustomFeatureStyle"
    factory=".geostylemanager.GeoStyleManager" />

  <adapter
      for="*
           collective.geo.geographer.interfaces.IGeoView"
      provides=".interfaces.IGeoManager"
      factory=".geomanager.GeoManager" />

  <utility
      factory=".vocabularies.coordsVocab"
      name="coordsVocab"
      provides="zope.schema.interfaces.IVocabularyFactory" />


  <!-- Adapter to mark object with interface -->
  <adapter
      for="Products.ATContentTypes.interface.interfaces.IATContentType"
      factory=".geomarker.GeoMarker"
      provides=".interfaces.IGeoMarker"
      />

  <!-- Event Subscriber to mark object with interface -->
  <subscriber
      for="Products.ATContentTypes.interface.interfaces.IATContentType
           zope.lifecycleevent.IObjectCreatedEvent"
      handler=".events.markGeoObject"
      />

</configure>
