\GeoMashupRenderMap

Static class for map rendering namespace

Summary

Methods
Properties
Constants
map_script()
enqueue_style()
enqueue_script()
head()
map_property()
get_map_data()
render_map()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
enqueue_styles()
enqueue_scripts()
extract_template_properties()
add_term_properties()
$map_data
N/A

Properties

$map_data

$map_data : array

Map data built for a request.

Type

array

Methods

map_script()

map_script(string $element_id) : string

Template tag for the current map script.

Parameters

string $element_id

The DOM id of the map container.

Returns

string —

The script tag to generate the map for this request.

enqueue_style()

enqueue_style(string $handle)

Enqueue a style to be included in the map frame.

Register external styles with wp_register_style(). Register local styles with GeoMashup::register_style().

Parameters

string $handle

The handle used to register the style.

enqueue_script()

enqueue_script(string $handle)

Enqueue a script to be included in the map frame.

Register external scripts with wp_register_script(). Register local scripts with GeoMashup::register_script().

Parameters

string $handle

The handle used to register the script.

head()

head()

Print only resources queued for the Geo Mashup map frame.

Can be replaced with wp_head() to include all blog resources in map frames.

map_property()

map_property(string $name, string $new_value) : string|null

Template tag to get a property of the map for the current request.

Current properties available: height and width for inline map styles.

Parameters

string $name

The name of the property to get.

string $new_value

Optional, sets the property if supplied.

Returns

string|null —

The property value or null if not found.

get_map_data()

get_map_data() : array

Retrieve any cached map data, or build it.

Returns

array —

Map data for the current query.

render_map()

render_map()

Render the requested map.

enqueue_styles()

enqueue_styles()

Resolve and queue map styles.

enqueue_scripts()

enqueue_scripts(array $map_data)

Resolve and queue map scripts.

Parameters

array $map_data

Map data for the current query.

extract_template_properties()

extract_template_properties(array $map_data)

Extract data from the map that may be needed in the frame template.

Parameters

array $map_data

Map data for the current query, modified to

                   remove template-only data.

add_term_properties()

add_term_properties(array $map_data)

Add term data for filtering, legends, and such.

Parameters

array $map_data

Map data for the current query, modified to

                   add term structure data.