wiki:BluePrintGISAPI

Version 5 (modified by Fran Boon, 12 years ago) ( diff )

Current API used by the FRP application

GIS API

Developers need to be able to embed maps within their Modules & display Features.

They don't want to have to become GIS experts for this - they just want to be able to call a documented mapping API:

  • A function which returns all the HTML needed to insert a map on the page, with the following customizations:
    • Be able to define which locations get placed on this map. This might include a number of different types (groups?) of locations. For each type/group we can specify:
      • The Marker (default from gis module).
      • A function to call to return the size/colour of the marker, based on the location id. (advanced)
      • A form which get displayed as the pop-up for the markers (along with the location_id as a arg/var, so can customize the display)
    • Be able to define the default size of the map

We can pass information in 3 different ways:

  1. Argument
  2. Global variable (e.g. request.s3.gis_*)
  3. Config in Database
    • gis.read_config()

Here is the API from the original PHP version:

This is the current API used by the FRP application:

http://127.0.0.1:8000/frp/gis/map_viewing_client?kml_name=Programmes&kml_feed=http://127.0.0.1:8000/frp/or/programme/report.kml?from=2010-04-23&until=2010-04-23&mode=programme

Proposed API (early draft!):

    request.s3.gis_features = []
    gis.show_map(height=default, width=default)

GIS BluePrints

Note: See TracWiki for help on using the wiki.