GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Class: GeoMashup

Source Location: /geo-mashup.php

Class Overview


The Geo Mashup static class.


Author(s):

Methods



Class Details

[line 46]
The Geo Mashup static class.

Used primarily for namespace, with methods called using the scope operator, like echo GeoMashup::map();




Tags:

since:  1.0
access:  public


[ Top ]


Class Methods


static method category_legend [line 850]

static string category_legend( [string|array $args = null])

Category legend template tag.

Returns a placeholder where a related map should display a legend for the categories of the displayed content.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Category_Legend
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method category_name [line 822]

static string category_name( [string|array $option_args = null])

Category name template tag.

If there is a map_cat parameter, return the name of that category.




Tags:

return:  Category name.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Category_Name
since:  1.1
access:  public


Parameters:

string|array   $option_args   Template tag arguments.

[ Top ]

static method current_location [line 1004]

static object|bool current_location( [string $output = OBJECT])

Get the location of the current loop object, if any.



Tags:

return:  Location object or false if none.
since:  1.3
access:  public


Parameters:

string   $output   ARRAY_A | ARRAY_N | OBJECT

[ Top ]

static method explode_assoc [line 359]

static array explode_assoc( string $glue1, string $glue2, string $str)

Helper to turn a string of key-value pairs into an associative array.



Tags:

return:  The associative array.
since:  1.0
access:  public


Parameters:

string   $glue1   Pair separator.
string   $glue2   Key/value separator.
string   $str   String to explode.

[ Top ]

static method full_post [line 799]

static string full_post( [string|array $args = null])

Full post template tag.

Returns a placeholder where a related map should display the full post content of the currently selected marker.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Full_Post
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method get_kml_attachment_urls [line 446]

static array get_kml_attachment_urls( id $post_id)

Get an array of URLs of KML or KMZ attachments for a post.



Tags:

return:  Array of URL strings.
since:  1.1
access:  public


Parameters:

id   $post_id  

[ Top ]

static method get_locations_json [line 527]

static string get_locations_json( string|array $query_args)

Query object locations and return JSON.

Offers customization per object location via a filter, geo_mashup_locations_json_object.




Tags:

return:  Queried object locations JSON ( { "object" : [...] } ).
filter:  geo_mashup_locations_json_object Filter each location associative array before conversion to JSON.
since:  1.2
access:  public
uses:  GeoMashupDB::get_object_locations()


Parameters:

string|array   $query_args   Query variables for GeoMashupDB::get_object_locations().

[ Top ]

static method implode_assoc [line 383]

static string implode_assoc( string $inner_glue, string $outer_glue, array $array, [mixed $skip_empty = false], [mixed $urlencoded = false])

Helper to turn an associative array into a string of key-value pairs.



Tags:

return:  The imploded string.
since:  1.0
access:  public


Parameters:

string   $inner_glue   Key/value separator.
string   $outer_glue   Pair separator.
array   $array   Array to implode.
mixed   $skip_empty   Whether to include empty values in output.
mixed   $urlencoded   Whetern to URL encode the output.

[ Top ]

static method join_post_queries [line 343]

static void join_post_queries( bool $yes_or_no)

Toggle limiting of query_posts to located posts only, with Geo Mashup query extensions.

When enabled, only posts with locations will be returned from WordPress query_posts() and related functions. Also adds Geo Mashup public query variables.

Caution - what if a future Geo Mashup incorporates multiple locations per object?




Tags:

since:  1.3
access:  public


Parameters:

bool   $yes_or_no   Whether to activate the join or not.

[ Top ]

static method json_encode [line 408]

static string json_encode( scalar|array $item)

Encode an item as a JSON string.

I believe WP 2.9 will include a function like this.




Tags:

return:  JSON encoded string, empty if not encodable.
since:  1.3
access:  public


Parameters:

scalar|array   $item   Scalars are quoted, number-indexed arrays become JSON arrays, string-indexed arrays become JSON objects.

[ Top ]

static method list_located_posts [line 1223]

static string list_located_posts( [ $option_args = null], string|array $args)

List located posts template tag.

Returns an HTML list of all located posts.




Tags:

return:  List HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#List_Located_Posts
since:  1.1
access:  public


Parameters:

string|array   $args   Template tag arguments.
   $option_args  

[ Top ]

static method list_located_posts_by_area [line 1252]

static string list_located_posts_by_area( string|array $args)

List located posts by area template tag.

Returns an HTML list of all located posts by country and state. May try to look up this information when absent.




Tags:

return:  List HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#List_Located_Posts_By_Area
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method location_info [line 1050]

static string location_info( [string|array $args = ''])

A template tag to insert location information.



Tags:

return:  The information requested, empty string if none.
since:  1.3
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method map [line 610]

static string map( [string|array $atts = null])

The map template tag.

Returns HTML for a Google map. Must use with echo in a template: echo GeoMashup::map();.




Tags:

return:  The HTML for the requested map.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Map
since:  1.0
access:  public


Parameters:

string|array   $atts   Template tag parameters.

[ Top ]

static method post_coordinates [line 1308]

static array post_coordinates( [string|array $places = 10])

Post coordinates template tag.

Get the coordinates of the current post.




Tags:

return:  Array containing 'lat' and 'lng' keys.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Post_Coordinates
deprecated:  1.3 Use GeoMashup::current_location()
since:  1.0
access:  public


Parameters:

string|array   $places   Maximum number of decimal places to use.

[ Top ]

static method show_on_map_link [line 1152]

static string show_on_map_link( [ $args = null])

A template tag to insert a link to the current location post on the global map page.



Tags:

return:  The link HTML, empty if no current location is found.
since:  1.3
access:  public


Parameters:

   $args  

[ Top ]

static method show_on_map_link_url [line 1111]

static string show_on_map_link_url( [ $args = null])

A template tag to return an URL for the current location on the global map page.



Tags:

return:  The URL, empty if no current location is found.
since:  1.3
access:  public


Parameters:

   $args  

[ Top ]

static method tabbed_category_index [line 1379]

static string tabbed_category_index( string|array $args)

Tabbed category index template tag.

Returns a placeholder where a related map should display a list of map objects by category, organized into HTML suited for presentation as tabs.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Visible_Posts_List
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

static method visible_posts_list [line 1189]

static string visible_posts_list( [string|array $args = null])

Visible posts list template tag.

Returns a placeholder where a related map should display a list of the currently visible posts.




Tags:

return:  Placeholder HTML.
link:  http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Visible_Posts_List
since:  1.2
access:  public


Parameters:

string|array   $args   Template tag arguments.

[ Top ]

method body_attribute [line 1037]

void body_attribute( )

A tag to insert the the onload call needed by IE (and works in Firefox) in the body tag to load the Google map.



Tags:

deprecated:  1.0 No longer necessary.


[ Top ]

method post_link [line 1097]

void post_link( [ $option_args = ''])

A template tag to insert a link to a post on the mashup.



Tags:



Parameters:

   $option_args  

[ Top ]


Documentation generated on Thu, 18 Feb 2010 20:41:31 +0000 by phpDocumentor 1.4.3