Changes between Version 18 and Version 19 of BluePrintGISAPI


Ignore:
Timestamp:
05/16/10 23:05:21 (15 years ago)
Author:
Fran Boon
Comment:

Update to current implementation

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintGISAPI

    v18 v19  
    4141
    4242=== Proposed API ===
    43 Early draft!
     43Draft - work in progress!
    4444==== Embed a map within a Page ====
    4545{{{
    4646    gis.show_map(
    47                  internal_overlays   = None,
    48                  internal_layertree  = True,
    49                  external_overlays   = False
    50                  external_layertree  = True,
     47                 height              = None,
     48                 width               = None,
     49                 lat                 = None,
     50                 lon                 = None,
     51                 zoom                = None,
     52                 feature_overlays    = {},
     53                 catalogue_overlays  = False,
     54                 catalogue_toolbar   = False,
    5155                 toolbar             = False,
    52                  height              = <default>,
    53                  width               = <default>,
    54                  lat                 = <default>,
    55                  lon                 = <default>,
    56                  zoom                = <default>,
    57                  base_layers         = <default>
    58 )
     56                 mgrs                = False,
     57                 window              = False):
    5958    """
    60     internal_overlays - list of dictionaries:
    61         {
    62          db.gis_feature_group.name,
    63          filter = None,         # A query to limit which features from the feature group are loaded
    64          active = True,         # Is the feed displayed upon load or needs ticking to load afterwards?
    65          popup_url = <default>, # The URL which will be used to fill the pop-up. it will be appended by the Location ID.
    66          marker = <default>     # The icon used to display the feature. Can be a lambda to vary icon (size/colour) based on attribute levels.
    67         }
    68     internal_layertree - bool - whether or not to display the menu to turn on and off the internal_layers
    69     external_overlays - bool - whether or not to display the overlays enabled in the Map Service Catalogue
    70     [- list of ints - The external overlays (WMS/KML/GeoRSS/etc) to display on the map. Hard-coding this is Ugly! Can we not just make it Bool & use Map Service Catalogue for more control?]
    71     external_layertree - bool - whether or not to display the menu to turn on and off the external_layers
    72     toolbar - bool - whether or not to display the toolbar
    7359    height - int - height of map in pixels
    7460    width - int - width of map in pixels
     
    7662    lon - double - Initial map center point
    7763    zoom - int - the initial zoom level of the map
     64    feature_overlays - list of dictionaries:
     65        {
     66         feature_group: db.gis_feature_group.name,
     67         filter : None,         # A query to limit which features from the feature group are loaded
     68         active : True,         # Is the feed displayed upon load or needs ticking to load afterwards?
     69         popup_url : <default>, # The URL which will be used to fill the pop-up. it will be appended by the Location ID.
     70         marker : <default>     # The icon used to display the feature. Can be a lambda to vary icon (size/colour) based on attribute levels.
     71        }
     72    catalogue_overlays - bool - whether or not to display the overlays enabled in the Map Service Catalogue
     73    [- list of ints - The external overlays (WMS/KML/GeoRSS/etc) to display on the map. Hard-coding this is Ugly! Can we not just make it Bool & use Map Service Catalogue for more control?]
     74    catalogue_toolbar - bool - whether or not to display the Map Service Catalogue toolbar
     75    toolbar - bool - whether or not to display the GeoExt toolbar
     76    mgrs - bool - whether or not to enable the MGRS PDF finder control
     77    window - bool - whether or not to have the map pop out into a resizable window
    7878    base_layers - list of ints - base layers used for map. Hard-coding this is Ugly! Can we not just use Map Service Catalogue for this? Maybe creating separate configurations for separate use-cases, so can call e.g. db.gis_config.3 instead of the default
     79    internal_layertree - bool - whether or not to display the menu to turn on and off the internal_layers
     80    external_layertree - bool - whether or not to display the menu to turn on and off the external_layers
    7981
    8082    Will return the HTML to embed a map with the specified options.