You are here

API.txt in Openlayers 6.2

Same filename and directory in other branches
  1. 6 docs/API.txt
  2. 7.2 docs/API.txt
Current for 6.x-2.0-alpha2

This file contains the main API functions for OpenLayers and its sub-modules.
Please refer to the project page for more up to date information and
documentation:

* http://drupal.org/project/openlayers


# Advanced Help

Browsable documentation is available through the [Advanced Help
module.](http://drupal.org/project/advanced_help)


# Map Build Process

The parts to build a map - layers, behaviors, presets, and styles - are loaded
with menu loaders, like `openlayers_layer_export_load`. They should not be
loaded manually because menu loaders do the necessary instantiation and
cache-clearing.

In 2.x, layers, behaviors, and styles contain more logic for 'rendering
themselves' than before, but cannot completely exist on their own. The functions
that iterate over included layers, behaviors, and styles are in
`openlayers.render.inc`.

`openlayers_build_map` and `openlayers_render_map` are the two essential parts
of the actual map building and rendering, and are included in
`openlayers.module`.

The map building process does not directly deal with map data: in the case that
Drupal is rendering data (as in openlayers_views), this functionality is
encapsulated in the `render()` method of the layer type. See
`modules/openlayers_views` for an example of how this works.

File

docs/API.txt
View source
  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, presets, 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.