API.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Current for 6.x-2.0-alpha2
  2. This file contains the main API functions for OpenLayers and its sub-modules.
  3. Please refer to the project page for more up to date information and
  4. documentation:
  5. * http://drupal.org/project/openlayers
  6. # Advanced Help
  7. Browsable documentation is available through the [Advanced Help
  8. module.](http://drupal.org/project/advanced_help)
  9. # Map Build Process
  10. The parts to build a map - layers, behaviors, maps, and styles - are loaded
  11. with menu loaders, like `openlayers_layer_export_load`. They should not be
  12. loaded manually because menu loaders do the necessary instantiation and
  13. cache-clearing.
  14. In 2.x, layers, behaviors, and styles contain more logic for 'rendering
  15. themselves' than before, but cannot completely exist on their own. The functions
  16. that iterate over included layers, behaviors, and styles are in
  17. `openlayers.render.inc`.
  18. `openlayers_build_map` and `openlayers_render_map` are the two essential parts
  19. of the actual map building and rendering, and are included in
  20. `openlayers.module`.
  21. The map building process does not directly deal with map data: in the case that
  22. Drupal is rendering data (as in openlayers_views), this functionality is
  23. encapsulated in the `render()` method of the layer type. See
  24. `modules/openlayers_views` for an example of how this works.