Projects‎ > ‎

XForms - Google Maps Component

Note: This page contains information relative to the implementation of the map component. If you'd like to use the component, see the documentation for the map in Existing XBL Components.

Test cases to be written:

  1. TODO

Future improvements:

  1. A Google Maps key is hard coded in map.xbl. Users of the component should instead provide their Google Maps key through an XForms property.
    • Right now the way we handle XForms properties hasn't been designed to support XBL components and might need to be extended for this.
    • With this change, the Google JavaScript will be loaded dynamically from JavaScript using YUI Get.
  2. longitude-ref and latitude-ref should be optional. If not provided, the marker is positioned just based on the address, and the marker cannot be moved.
  3. If no longitude/latitude and no address is provided, or if the address cannot be geocoded, then the map will show the whole world.
  4. The initial zoom level is hard-coded and doesn't depend on the precision of the address. But it should depend on how procise the address is, as it doesn't make sense to zoom at the same level if the address contains just a state, just a zip code, or a full address with street name and number. For this, we need to use the getLocations() API if the geocoder instead of just getLatLng(). Let's call this feature "auto-zoom".
  5. The user of the component should be able to provide an initial zooming level, which if provided will be used instead doing an auto-zoom. This will add a new attribute: initial-zoom-value="XPath".
  6. Make the component more robust to usage errors, specifically, missing attributes. Right now, if a required attribute is missing, we get an error which is meaningless to users of the component.