Changes between Version 35 and Version 36 of DeveloperGuidelines/GIS


Ignore:
Timestamp:
10/22/10 08:27:36 (14 years ago)
Author:
Fran Boon
Comment:

Update API to include the <ID> (& anything else changed recently)

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/GIS

    v35 v36  
    3232              add_feature_active = False,
    3333              feature_queries = [],
    34               feature_groups = [],
    3534              wms_browser = {},
    3635              catalogue_overlays = False,
     
    3938              toolbar = False,
    4039              search = False,
     40              mouse_position = "normal",
    4141              print_tool = {},
    4242              mgrs = {},
    4343              window = False,
     44              window_hide = False,
    4445              collapsed = False,
    4546              public_url = "http://127.0.0.1:8000"
    4647            ):
    4748    """
    48     @param height: Height of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    49     @param width: Width of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    50     @param bbox: default Bounding Box of viewport (if not provided then the Lat/Lon/Zoom are used) (Dict):
    51         {
    52         "max_lat" : float,
    53         "max_lon" : float,
    54         "min_lat" : float,
    55         "min_lon" : float
    56         }
    57     @param lat: default Latitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    58     @param lon: default Longitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    59     @param zoom: default Zoom level of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    60     @param projection: EPSG code for the Projection to use (if not provided then the default setting from the Map Service Catalogue is used)
    61     @param add_feature: Whether to include a DrawFeature control to allow adding a marker to the map
    62     @param add_feature_active: Whether the DrawFeature control should be active by default
    63     @param feature_queries: Feature Queries to overlay onto the map & their options (List of Dicts):
    64         [{
    65          name   : "Query",      # A string: the label for the layer
    66          query  : query,        #A gluon.sql.Rows of gis_locations, which can be from a simple query or a Join. Extra fields can be added for 'marker' or 'shape' (with optional 'color' & 'size') & 'popup_label'
    67          active : False,        # Is the feed displayed upon load or needs ticking to load afterwards?
    68          popup_url : None,      # The URL which will be used to fill the pop-up. it will be appended by the Location ID.
    69          marker : None          # The marker_id for the icon used to display the feature (over-riding the normal process).
    70          }]
    71     @param feature_groups: Feature Groups to overlay onto the map & their options (List of Dicts):
    72         [{
    73          feature_group : db.gis_feature_group.name,
    74          parent : None,         # Only display features with this parent set. ToDo: search recursively to allow all descendants
    75          filter : None,         # A query to further limit which features from the feature group are loaded
    76          active : False,        # Is the feed displayed upon load or needs ticking to load afterwards?
    77          popup_url : None,      # The URL which will be used to fill the pop-up. it will be appended by the Location ID.
    78          marker : None          # The marker_id for the icon used to display the feature (over-riding the normal process).
    79          }]
    80     @param wms_browser: WMS Server's GetCapabilities & options (dict)
    81         {
    82         name: string,           # Name for the Folder in LayerTree
    83         url: string             # URL of GetCapabilities
    84         }
    85     @param catalogue_overlays: Show the Overlays from the GIS Catalogue (@ToDo: make this a dict of which external overlays to allow)
    86     @param catalogue_toolbar: Show the Catalogue Toolbar
    87     @param legend: Show the Legend panel
    88     @param toolbar: Show the Icon Toolbar of Controls
    89     @param search: Show the Geonames search box
    90     @param print_tool: Show a print utility (NB This requires server-side support: http://eden.sahanafoundation.org/wiki/BluePrintGISPrinting)
    91         {
    92         url: string,            # URL of print service (e.g. http://localhost:8080/geoserver/pdf/)
    93         mapTitle: string        # Title for the Printed Map (optional)
    94         subTitle: string        # subTitle for the Printed Map (optional)
    95         }
    96     @param mgrs: Use the MGRS Control to select PDFs
    97         {
    98         name: string,           # Name for the Control
    99         url: string             # URL of PDF server
    100         }
    101     @param window: Have viewport pop out of page into a resizable window
    102     @param collapsed: Start the Tools panel (West region) collapsed
    103     @param public_url: pass from model (not yet defined when Module instantiated
     49        Returns the HTML to display a map
     50
     51        Normally called in the controller as: map = gis.show_map()
     52        In the view, put: {{=XML(map)}}
     53
     54        @param height: Height of viewport (if not provided then the default setting from the Map Service Catalogue is used)
     55        @param width: Width of viewport (if not provided then the default setting from the Map Service Catalogue is used)
     56        @param bbox: default Bounding Box of viewport (if not provided then the Lat/Lon/Zoom are used) (Dict):
     57            {
     58            "max_lat" : float,
     59            "max_lon" : float,
     60            "min_lat" : float,
     61            "min_lon" : float
     62            }
     63        @param lat: default Latitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
     64        @param lon: default Longitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
     65        @param zoom: default Zoom level of viewport (if not provided then the default setting from the Map Service Catalogue is used)
     66        @param projection: EPSG code for the Projection to use (if not provided then the default setting from the Map Service Catalogue is used)
     67        @param add_feature: Whether to include a DrawFeature control to allow adding a marker to the map
     68        @param add_feature_active: Whether the DrawFeature control should be active by default
     69        @param feature_queries: Feature Queries to overlay onto the map & their options (List of Dicts):
     70            [{
     71             name   : "MyLabel",    # A string: the label for the layer
     72             query  : query,        # A gluon.sql.Rows of gis_locations, which can be from a simple query or a Join. Extra fields can be added for 'marker' or 'shape' (with optional 'color' & 'size') & 'popup_label'
     73             active : False,        # Is the feed displayed upon load or needs ticking to load afterwards?
     74             popup_url : None,      # The URL which will be used to fill the pop-up. If the string contains <id> then the Location ID will be replaced here, otherwise it will be appended by the Location ID.
     75             marker : None,         # The marker query or marker_id for the icon used to display the feature (over-riding the normal process).
     76             polygons : False       # Use Polygon data, if-available (defaults to just using Point)
     77            }]
     78        @param wms_browser: WMS Server's GetCapabilities & options (dict)
     79            {
     80            name: string,           # Name for the Folder in LayerTree
     81            url: string             # URL of GetCapabilities
     82            }
     83        @param catalogue_overlays: Show the Overlays from the GIS Catalogue (@ToDo: make this a dict of which external overlays to allow)
     84        @param catalogue_toolbar: Show the Catalogue Toolbar
     85        @param legend: Show the Legend panel
     86        @param toolbar: Show the Icon Toolbar of Controls
     87        @param search: Show the Geonames search box
     88        @param mouse_position: Show the current coordinates in the bottom-right of the map. 3 Options: 'normal' (default), 'mgrs' (MGRS), False (off)
     89        @param print_tool: Show a print utility (NB This requires server-side support: http://eden.sahanafoundation.org/wiki/BluePrintGISPrinting)
     90            {
     91            url: string,            # URL of print service (e.g. http://localhost:8080/geoserver/pdf/)
     92            mapTitle: string        # Title for the Printed Map (optional)
     93            subTitle: string        # subTitle for the Printed Map (optional)
     94            }
     95        @param mgrs: Use the MGRS Control to select PDFs
     96            {
     97            name: string,           # Name for the Control
     98            url: string             # URL of PDF server
     99            }
     100        @param window: Have viewport pop out of page into a resizable window
     101        @param window_hide: Have the window hidden by default, ready to appear (e.g. on clicking a button)
     102        @param collapsed: Start the Tools panel (West region) collapsed
     103        @param public_url: pass from model (not yet defined when Module instantiated
    104104    """
    105105}}}