| 61 | | [{ |
| 62 | | name : "Query", # A string: the label for the layer |
| 63 | | query : query, # A gluon.sql.Rows of gis_locations |
| 64 | | active : False, # Is the feed displayed upon load or needs ticking to load afterwards? |
| 65 | | popup_url : None, # The URL which will be used to fill the pop-up. it will be appended by the Location ID. |
| 66 | | marker : None # The marker_id for the icon used to display the feature (over-riding the normal process). |
| 67 | | # [Plan: Can be a lambda to vary icon (size/colour) based on attribute levels.] |
| 68 | | }] |
| 69 | | @param feature_groups: Feature Groups to overlay onto the map & their options (List of Dicts): |
| 70 | | [{ |
| 71 | | feature_group : db.gis_feature_group.name, |
| 72 | | parent : None, # Only display features with this parent set. ToDo: search recursively to allow all descendants |
| 73 | | filter : None, # A query to further limit which features from the feature group are loaded |
| 74 | | active : False, # Is the feed displayed upon load or needs ticking to load afterwards? |
| 75 | | popup_url : None, # The URL which will be used to fill the pop-up. it will be appended by the Location ID. |
| 76 | | marker : None # The marker_id for the icon used to display the feature (over-riding the normal process). |
| 77 | | # [Plan: Can be a lambda to vary icon (size/colour) based on attribute levels.] |
| 78 | | }] |
| | 65 | [{ |
| | 66 | name : "Query", # A string: the label for the layer |
| | 67 | 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') |
| | 68 | active : False, # Is the feed displayed upon load or needs ticking to load afterwards? |
| | 69 | popup_url : None, # The URL which will be used to fill the pop-up. it will be appended by the Location ID. |
| | 70 | marker : None # The marker_id for the icon used to display the feature (over-riding the normal process). |
| | 71 | }] |
| | 72 | @param feature_groups: Feature Groups to overlay onto the map & their options (List of Dicts): |
| | 73 | [{ |
| | 74 | feature_group : db.gis_feature_group.name, |
| | 75 | parent : None, # Only display features with this parent set. ToDo: search recursively to allow all descendants |
| | 76 | filter : None, # A query to further limit which features from the feature group are loaded |
| | 77 | active : False, # Is the feed displayed upon load or needs ticking to load afterwards? |
| | 78 | popup_url : None, # The URL which will be used to fill the pop-up. it will be appended by the Location ID. |
| | 79 | marker : None # The marker_id for the icon used to display the feature (over-riding the normal process). |
| | 80 | }] |
| | 106 | }}} |
| | 107 | |
| | 108 | === Variable Markers === |
| | 109 | Example: |
| | 110 | {{{ |
| | 111 | query = (db.gis_location.deleted == False) |
| | 112 | query = query & (db.gis_location.id == db["%s_%s" % (module, resource)].location_id) |
| | 113 | locations = db(query).select(db.gis_location.id, db.gis_location.uuid, db.gis_location.name, db.gis_location.wkt, db.gis_location.lat, db.gis_location.lon) |
| | 114 | for i in range(0, len(locations)): |
| | 115 | locations[i].gis_location.shape = "circle" |
| | 116 | locations[i].gis_location.size = locations[i][db["%s_%s" % (module, resource)].MyIntegerField] |