diff -r 032947e7ef0c -r d9ee6f8ddb76 src/pyams_gis/interfaces/layer.py --- a/src/pyams_gis/interfaces/layer.py Wed Jan 27 15:36:14 2021 +0100 +++ b/src/pyams_gis/interfaces/layer.py Wed Jan 27 15:37:20 2021 +0100 @@ -10,22 +10,18 @@ # FOR A PARTICULAR PURPOSE. # -__docformat__ = 'restructuredtext' +from zope.annotation.interfaces import IAttributeAnnotatable +from zope.interface import Attribute +from zope.location.interfaces import IContained +from zope.schema import Bool, Choice, Int, Text, TextLine +from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary + +from pyams_gis.interfaces import LAYER_CRS_VOCABULARY +from pyams_gis.schema import GeoAreaField +from pyams_i18n.schema import I18nTextLineField -# import standard library - -# import interfaces -from pyams_gis.interfaces import LAYER_CRS_VOCABULARY -from zope.annotation.interfaces import IAttributeAnnotatable -from zope.location.interfaces import IContained - -# import packages -from pyams_gis.schema import GeoAreaField -from pyams_i18n.schema import I18nTextLineField -from zope.interface import Attribute -from zope.schema import Bool, Choice, Int, TextLine -from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm +__docformat__ = 'restructuredtext' from pyams_gis import _ @@ -64,6 +60,18 @@ """Get layer configuration mapping""" +class IGeoJSONLayer(IMapLayer): + """GeoJSON map layer interface""" + + url = TextLine(title=_("Layer URL"), + description=_("URL used to get access to JSON data"), + required=True) + + style = Text(title=_("Layer style"), + description=_("Layer style, provided in Leaflet JSON format"), + required=False) + + class IBaseTileMapLayer(IMapLayer): """Base tile map layer interface"""