-
Notifications
You must be signed in to change notification settings - Fork 6
Map plugin
cbara edited this page May 22, 2013
·
21 revisions
- Reference name: GeoNamesMapPlugin
- Code Source:
geonamesmapplugin.coffee
- Compiled Source:
geonamesmapplugin.js
-
Generates Map widgets for concepts that refer to locations.
-
It's expanded widget has a fixed dimension of 600px X 600px
-
The expanded widget contains 3 tabs:
- Map tab (green) creates a Google interactive map centered on the annotated geonames reference
- Weather tab (yellow) enables a Weather.com weather forecast layer, fully interactive, on top of the previously mentioned map.
- Rout tab (orange) creates a rout map from the current user location, with the user consent, to the annotated location
- LDPlugin, Google API
- This plugin reacts to annotations that contain in their resource fields Geonames API calls that point to the annotated location.
- The plugin processes this response, by extracting the
location name
, thelatitude
andlongitude
in decimal form. - A Google Map API query string is being built with the extracted information.
- Simple widget composed of: a button with a green map icon and the targeting location name.
- Expanded widget composed of: a video overlaying panel containing 3 tabs:
- Map tab (green)
- Weather tab (yellow)
- Rout tab (orange)
- Map tab (green)
- This plugin will attach the rendering logic of the widgets in the
becomeActive
event handler of each annotation that contains a Geonames call in it resource field.
- Each widget binds activate events to
click
events and will trigger a widget expansion - Expanded widgets close when 'clicking' the close (X) icon at the top left hand side of the expanded widget
- Map tab (green)
- 'double click' - zooms in and centers the map on the clicked point
- 'scroll up' and 'scroll down' - zoom in and out, respectively, on the current map center point
- 'click and drag' - pans the map according to the drag direction
- Weather tab (yellow)
- all of the Map tab behaviors apply
- 'click' on the weather icons will trigger and map overlay with the 4 day forecast (temperature in Celsius and precipitations)
- Rout tab (orange)
- all of the Map tab behaviors apply
- Map tab (green)
- Each widget binds activate events to
tap
events and will trigger a widget expansion - Expanded widgets close when 'tapping' the close (X) icon at the top left hand side of the expanded widget
- Map tab (green)
- 'double tap' - zooms in and centers the map on the clicked point
- 'pinch to zoom' - zoom in and out, respectively, on the current map center point
- 'touch drag' - pans the map according to the drag direction
- Weather tab (yellow)
- all of the Map tab behaviors apply
- 'tap' on the weather icons will trigger and map overlay with the 4 day forecast (temperature in Celsius and precipitations)
- Rout tab (orange)
- all of the Map tab behaviors apply
- Map tab (green)
- Each widget binds activate events to 'OK' events and will trigger a widget expansion
- Expanded widgets close when pressing the 'BACK' button
- Map tab (green) selected by default
- 'UP' and 'DOWN' arrow buttons - zoom in and out, respectively, on the current map center point
- Weather tab (yellow)
- all of the Map tab behaviors apply
- Rout tab (orange)
- all of the Map tab behaviors apply
- Map tab (green) selected by default