Exhibit/Map View
From SIMILE Widgets
To add maps to your exhibit, you must include the map extension (after you include exhibit-api.js):
<script src="http://api.simile-widgets.org/exhibit/2.2.0/extensions/map/map-extension.js?gmapkey="></script>
If you are using your exhibit locally, you don't need to specify a Google Maps key. To publish your exhibit on the Web, Google Maps requires a key. See the tutorial above for how to get a key.
To include a map view, add to your HTML
<div ex:role="view" ex:viewClass="Map" ex:latlng=".latlng"> </div>
Replace .latlng with the appropriate expression for your exhibit.
Other settings supported include:
| setting name | type of value | default | choices | meaning |
|---|---|---|---|---|
| ex:center | float | 20,0 | latitude/longitude where the map centers at the beginning | |
| ex:zoom | float | 2 | zoom level | |
| ex:size | text | small | size of map controls | |
| ex:scaleControl | boolean | true | whether to show the map scale control | |
| ex:overviewControl | boolean | false | whether to show the map overview control | |
| ex:type | enum | normal | "normal", "satellite", "hybrid" | the type of map |
| ex:bubbleTip | enum | top | "top", "bottom" | whether the map bubble points at the top or at the bottom of map markers |
| ex:mapHeight | int | 400 | the map's height in pixels | |
| ex:mapConstructor | function | a custom map constructor | ||
| ex:color | text | #FF9000 | default color for map marker | |
| ex:colorKey | expression | expression for getting the keys used to color-code the map markers | ||
| ex:colorCoder | text | id of a color coder | ||
| ex:sizeKey | expression | expression for getting the keys used to size-code the map markers | ||
| ex:sizeCoder | text | id of a size coder | ||
| ex:iconKey | expression | expression for getting the keys used to add icons the map markers | ||
| ex:iconCoder | text | id of an icon coder | ||
| ex:selectCoordinator | text | id of a coordinator | ||
| ex:iconSize | int | 0 | ||
| ex:iconFit | text | smaller | "smaller", "larger", "none", "both" | how to fit icon images into map markers |
| ex:iconScale | float | 1 | scaling adjustment to icon images after fitting them | |
| ex:iconOffsetX | float | 0 | translational adjustment to icon images (in pixels) | |
| ex:iconOffsetY | float | 0 | translational adjustment to icon images (in pixels) | |
| ex:shape | text | circle | shape of map markers | |
| ex:shapeWidth | int | 24 | width of shape of map markers (in pixels) | |
| ex:shapeHeight | int | 24 | width of shape of map markers (in pixels) | |
| ex:shapeAlpha | float | 0.7 | alpha of shape of map markers | |
| ex:pin | boolean | true | whether map markers have pins | |
| ex:pinHeight | int | 6 | width of pins of map markers (in pixels) | |
| ex:pinWidth | int | 6 | width of pins of map markers (in pixels) | |
| ex:borderOpacity | float | 0.5 | when drawing polygons or polylines, the default opacity of the border or line | |
| ex:borderWidth | int | 1 | when drawing polygons or polylines, the default width of the border or line | |
| ex:borderColor | text | when drawing polygons or polylines, the default color of the border | ||
| ex:opacity | float | 0.7 | when drawing polygons, the default opacity of the polygon fill | |
| ex:sizeLegendLabel | text | |||
| ex:colorLegendLabel | text | |||
| ex:iconLegendLabel | text | |||
| ex:markerScale | text | |||
| ex:showHeader | boolean | true | whether or not to show the header of the view | |
| ex:showSummary | boolean | true | whether or not to show the summary information of the view | |
| ex:showFooter | boolean | true | whether or not to show the footer of the view | |
| ex:proxy | expression | expression for getting an item containing a latitude an longitude (specified by ex:lat and ex:long expressions). Needed in the complex case where an item needs to be plotted in multiple locations and you need to be clear which latitude goes with which longitude. | ||
| ex:latlngOrder | enum | "latlng" | "latlng","lnglat" | whether the data is provided in the form of (latitude, longitude) or the reverse |
| ex:latlngPairSeparator | text | ";" | character used to separate location pairs in a line or polygon |

