Skip to content
cbara edited this page May 22, 2013 · 21 revisions
  • Reference name: GeoNamesMapPlugin
  • Code Source: geonamesmapplugin.coffee
  • Compiled Source: geonamesmapplugin.js

Features

  • 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

Dependencies

  • LDPlugin, Google API

Web API connections

  • 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, the latitude and longitude in decimal form.
  • A Google Map API query string is being built with the extracted information.

Widgets

  • Simple widget composed of: a button with a green map icon and the targeting location name. simple map widget
  • Expanded widget composed of: a video overlaying panel containing 3 tabs:
    • Map tab (green)
      • expanded map widget - the map tab
    • Weather tab (yellow)
      • expanded map widget - the weather tab
    • Rout tab (orange)
      • expanded map widget - the rout tab

Events

  • 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.

Mouse interaction

  • 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

Touch interaction

  • 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

Google TV remote control interaction

  • 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