You are here

openlayers-api-api.html in Openlayers 6

File

help/openlayers-api-api.html
View source
This documentation can be found in the <em>docs/API.txt</em> file and may be more up to date and verbose.

<p><strong><em>needs work</em></strong></p>

<pre>
  * openlayers_initialize()
    --
    Use this function to include the OpenLayers JS
    library.  Note: openlayers_render() will call
    this.


  * openlayers_render_map($map = array(), $render = TRUE)
    --
    Renders a map array and returns the rendered array
    and errors if there were any.


  * openlayers_layers_get_info($reset = FALSE)
    --
    Get array of layer info


  * openlayers_behaviors_get_info($reset = FALSE)
    --
    Get array of behavior info


  * openlayers_styles_get_info($reset = FALSE)
    --
    Get array of style info


  * openlayers_save_preset($preset = array())
    --
    Save a preset in the DB


  * openlayers_get_preset($name = '', $reset = FALSE)
    --
    Get a preset from DB or hooks


  * openlayers_get_map($id = '')
    --
    A convient function to simply get just the map from
    the preset


  * openlayers_presets($reset = FALSE)
    --
    The main logic behind getting all presets


  * openlayers_get_presets($format = 'simple', $reset = FALSE)
    --
    Better function to get all presets in a formatted (simple,
    or full) array


  * openlayers_get_default_map($reset = FALSE)
    --
    Get the map that is designated as the default map


  * openlayers_merge_maps($map1 = array(), $map2 = array())
    --
    Function to merge two maps; the second parameter should
    hold the preferred data


  * openlayers_error_check_map($map, $log_errors = TRUE)
    --
    The render function will run this, but if you need
    to manually check a map for errors
</pre>