| 35 | | gis.show_map(height=default, width=default, overlays=False) |
| | 41 | gis.show_map(height=<default>, |
| | 42 | width=<default>, |
| | 43 | base_layer=<default>, |
| | 44 | internal_layers=None, |
| | 45 | internal_layer_menu = True, |
| | 46 | markers=<default>, |
| | 47 | popup_url = <default>, |
| | 48 | external_layers=None, |
| | 49 | external_layer_menu = True, |
| | 50 | map_center_lat = <default>, |
| | 51 | map_center_long = <default>, |
| | 52 | zoom = <default> |
| | 53 | ) |
| | 54 | """ |
| | 55 | height - int - height of map in pixels |
| | 56 | width - int - width of map in pixels |
| | 57 | base_layer - string - base layer used for map: "OSM", "Google", "Bing" |
| | 58 | internal_layers - list of strings - db.gis_feature_group.name to display on the map |
| | 59 | internal_layer_menu - bool - whether or not to display the menu to turn on and off the internal_layers |
| | 60 | markers - list of URLs - to images to display |
| | 61 | popup_url - list of strings - The URL which will be used to fill the pop-up (potentially different for each internal_layer) (???current term). it will be appended by the Location ID. |
| | 62 | external_layers - list of strings - List of the WMS(???) to display on the map |
| | 63 | external_layer_menu - bool - whether or not to display the menu to turn on and off the internal_layers |
| | 64 | map_center_lat - ??? - Initial map center point |
| | 65 | map_center_long - ??? - Initial map center point |
| | 66 | zoom - int - the initial zoom level of the map |
| | 67 | |
| | 68 | Will return the HTML to embed a map with the specified options. |
| | 69 | it would be cool it the layer menus could be tabs on the side, which slide out when you click on them... |
| | 70 | |
| | 71 | Questions: |
| | 72 | * I wonder if internal_layers and markers and popup_url should be joined together in a dictionary. |
| | 73 | * I wonder if we need another array to differentiate between int/ext layers which are a) initially displayed on the map AND b) shown on the menu (but not selected) |
| | 74 | * I am not entirely sure how the gis_feature_group will work. Perhaps it would be good to be able to pass a query to the function (one of the results of the query will be a location_id field). That would be really nice. |
| | 75 | |
| | 76 | Given all of these, I wonder if it would be best to pass a list of: |
| | 77 | internal_layer_options = {gis_feature_group_name, |
| | 78 | query, #if query = None, use gis_feature_group_name |
| | 79 | marker, |
| | 80 | default #if the layer defaults on, or just appears on the menu. |
| | 81 | } |
| | 82 | """ |