Changes between Version 24 and Version 25 of BluePrintGISAPI


Ignore:
Timestamp:
07/13/10 10:18:28 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintGISAPI

    v24 v25  
    1 == GIS API ==
     1= GIS API =
    22
    33Developers need to be able to embed maps within their Modules & display Features.
     
    1212  * Be able to define the default size of the map
    1313 * It would be good to be able to pass additional layers (or turn current layers off) to the map via JS, so that the map can be controlled dynamically using external controls. Although this probably represents a great deal of complexity and may need to be reconsidered.
     14
     15== Status ==
     16Live:
     17 * [wiki:DeveloperGuidelinesGIS#GuidelinesforDeveloperswishingtomakeuseofMappingwithintheirModule]
     18
     19
     20== Discussion ==
    1421
    1522We can pass information in 3 different ways:
     
    4047 * http://mapfish.org/doc/contribs/mapfishapi.html
    4148
    42 === Proposed API ===
    43 Status:
    44  * Live: [wiki:DeveloperGuidelinesGIS#GuidelinesforDeveloperswishingtomakeuseofMappingwithintheirModule]
    45 
    46 ==== Embed a map within a Page ====
    47 {{{
    48     def show_map( self,
    49                   height = None,
    50                   width = None,
    51                   lat = None,
    52                   lon = None,
    53                   zoom = None,
    54                   projection = None,
    55                   feature_overlays = [],
    56                   wms_browser = {},
    57                   catalogue_overlays = False,
    58                   catalogue_toolbar = False,
    59                   toolbar = False,
    60                   search = False,
    61                   print_tool = {},
    62                   mgrs = {},
    63                   window = False,
    64                   public_url = "http://127.0.0.1:8000"
    65                 ):
    66         """
    67             Returns the HTML to display a map
    68 
    69             @param height: Height of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    70             @param width: Width of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    71             @param lat: default Latitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    72             @param lon: default Longitude of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    73             @param zoom: default Zoom level of viewport (if not provided then the default setting from the Map Service Catalogue is used)
    74             @param projection: EPSG code for the Projection to use (if not provided then the default setting from the Map Service Catalogue is used)
    75             @param feature_overlays: Which Feature Groups to overlay onto the map & their options (List of Dicts):
    76                 [{
    77                  feature_group : db.gis_feature_group.name,
    78                  parent : None,         # Only display features with this parent set. ToDo: search recursively to allow all descendants
    79                  filter : None,         # A query to further limit which features from the feature group are loaded
    80                  active : False,        # Is the feed displayed upon load or needs ticking to load afterwards?
    81                  popup_url : None,      # The URL which will be used to fill the pop-up. it will be appended by the Location ID.
    82                  marker : None          # The icon used to display the feature (over-riding the normal process). Can be a lambda to vary icon (size/colour) based on attribute levels.
    83                 }]
    84             @param wms_browser: WMS Server's GetCapabilities & options (dict)
    85                 {
    86                 name: string,           # Name for the Folder in LayerTree
    87                 url: string             # URL of GetCapabilities
    88                 }
    89             @param catalogue_overlays: Show the Overlays from the GIS Catalogue (@ToDo: make this a dict of which external overlays to allow)
    90             @param catalogue_toolbar: Show the Catalogue Toolbar
    91             @param toolbar: Show the Icon Toolbar of Controls
    92             @param search: Show the Geonames search box
    93             @param print_tool: Show a print utility (NB This requires server-side support: http://eden.sahanafoundation.org/wiki/BluePrintGISPrinting)
    94                 {
    95                 url: string             # URL of print service (e.g. http://localhost:8080/geoserver/pdf/)
    96                 }
    97             @param mgrs: Use the MGRS Control to select PDFs
    98                 {
    99                 name: string,           # Name for the Control
    100                 url: string             # URL of PDF server
    101                 }
    102             @param window: Have viewport pop out of page into a resizable window
    103             @param public_url: pass from model (not yet defined when Module instantiated
    104 
    105             @ToDo: Rewrite these to use the API:
    106                 map_viewing_client()
    107                 display_feature()
    108                 display_features()
    109         """
    110 }}}
    111 
    112 ==== Produce Custom Overlay ====
     49=== Produce Custom Overlay ===
    11350
    11451This would produce a custom overlay with either: