src/pyams_gis/interfaces/layer.py
changeset 73 d9ee6f8ddb76
parent 0 c73bb834ccbe
equal deleted inserted replaced
72:032947e7ef0c 73:d9ee6f8ddb76
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
    13 from zope.annotation.interfaces import IAttributeAnnotatable
       
    14 from zope.interface import Attribute
       
    15 from zope.location.interfaces import IContained
       
    16 from zope.schema import Bool, Choice, Int, Text, TextLine
       
    17 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
       
    18 
       
    19 from pyams_gis.interfaces import LAYER_CRS_VOCABULARY
       
    20 from pyams_gis.schema import GeoAreaField
       
    21 from pyams_i18n.schema import I18nTextLineField
    14 
    22 
    15 
    23 
    16 # import standard library
    24 __docformat__ = 'restructuredtext'
    17 
       
    18 # import interfaces
       
    19 from pyams_gis.interfaces import LAYER_CRS_VOCABULARY
       
    20 from zope.annotation.interfaces import IAttributeAnnotatable
       
    21 from zope.location.interfaces import IContained
       
    22 
       
    23 # import packages
       
    24 from pyams_gis.schema import GeoAreaField
       
    25 from pyams_i18n.schema import I18nTextLineField
       
    26 from zope.interface import Attribute
       
    27 from zope.schema import Bool, Choice, Int, TextLine
       
    28 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
       
    29 
    25 
    30 from pyams_gis import _
    26 from pyams_gis import _
    31 
    27 
    32 
    28 
    33 #
    29 #
    60                    default=18,
    56                    default=18,
    61                    required=True)
    57                    required=True)
    62 
    58 
    63     def get_configuration(self):
    59     def get_configuration(self):
    64         """Get layer configuration mapping"""
    60         """Get layer configuration mapping"""
       
    61 
       
    62 
       
    63 class IGeoJSONLayer(IMapLayer):
       
    64     """GeoJSON map layer interface"""
       
    65 
       
    66     url = TextLine(title=_("Layer URL"),
       
    67                    description=_("URL used to get access to JSON data"),
       
    68                    required=True)
       
    69 
       
    70     style = Text(title=_("Layer style"),
       
    71                  description=_("Layer style, provided in Leaflet JSON format"),
       
    72                  required=False)
    65 
    73 
    66 
    74 
    67 class IBaseTileMapLayer(IMapLayer):
    75 class IBaseTileMapLayer(IMapLayer):
    68     """Base tile map layer interface"""
    76     """Base tile map layer interface"""
    69 
    77