rss_google_map

Plugin Details

Download:
rss_google_map  v0.5
Textpattern Forum:
View discussion
Plugin Type:
Regular
Current Version:
0.5
Status on this site:
Active

The rss_google_map plugin displays address data from articles on a Google Map. This could be useful on personal/travel sites to indicate the location that a post refers to or on business sites to indicate office location(s) on a single map.


The plugin can be used in one of five ways:

Option 1

  1. When calling the plugin, specify the address, city, state and zip code of the location you want to map. (example: <txp:rss_google_map address="1600 Pennsylvania Ave NW" city="Washington" state="DC" zip="20500" />)
  2. When the plugin is called, the address is looked up using the Yahoo! Maps geocoding service.
  3. If the location is found, the coordinates are added to the Google Map display using the Phoogle Maps PHP class.

Option 2

  1. When calling the plugin, specify the latitude and longitude of the location you want to map. (example: <txp:rss_google_map lat="38.898563" long="-77.037223" geotitle="The White House" />)
  2. The coordinates are added to the Google Map display using the Phoogle Maps PHP class.

Option 3

  1. You designate which custom fields in an article contain address data. By default, custom fields 1 – 4 are used.
  2. Set the address fields in a new article.
  3. Create an article form which includes a call to the plugin.
  4. When the plugin is called, the address from the current article is looked up using the Yahoo! Maps geocoding service.
  5. If the location is found, the coordinates are added to the Google Map display using the Phoogle Maps PHP class.

Option 4

  1. You designate which custom fields in an article contain coordinate data. By default, custom fields 5 – 6 are used.
  2. Set the latitude and longitude fields in a new article.
  3. Create an article form which includes a call to the plugin.
  4. When the plugin is called, the coordinates from the current article are added to the Google Map display using the Phoogle Maps PHP class.

Option 5

  1. You designate which custom fields in an article contain address data. By default, custom fields 1 – 4 are used.
  2. Set the address fields in a new article.
  3. When the plugin is called, the addresses are looked up using the Yahoo! Maps geocoding service.
  4. If the location is found, the coordinates are added to the Google Map display using the Phoogle Maps PHP class.

How To Use the Plugin

  1. Go get a Google Maps API Key. Its free, and you need a unique key for each domain you use the plugin on.
  2. Add the <txp:rss_google_map_js apikey="xxx" /> tag to the <head> section of your page. Set the apikey attribute using the key you just got.
  3. Add the <txp:rss_google_map /> tag to the <body> section of your page. Set the attributes as you like per the options below.
  4. If using option #2, write an article to the section and/or category you have specified in your rss_google_map options. (example: <txp:rss_google_map section="locations" category="office-maps" />)
  5. Publish and you’re mapped!

The rss_google_map_js tag

apikey
Your Google Maps API Key.
Default: ‘my-key’
Example: apikey=“go-get-your-own-key”
Required: yes. (your own key)

The rss_google_map tag

address
The street address of the location to be mapped.
Default: “”
Example: address=“1600 Pennsylvania Ave NW”

city
The city of the location to be mapped.
Default: “”
Example: city=“Washington”

state
The state of the location to be mapped.
Default: “”
Example: state=“DC”

zip
The zip code of the location to be mapped.
Default: “”
Example: zip=“20500”

usearticle
When used on an article form, the address fields will be read from the current article.
Default: “0”
Example: usearticle=“1”

section
Accepts a comma separated list of sections. NO spaces after commas.
Default: “article”
Example: section=“locations”

category
Accepts a comma separated list of categories. NO spaces after commas.
Default: “”
Example: categories=“catOne,catTwo”

addfield
The article field used for the street address.
Default: ‘custom_1’
Example: addfield=“custom_5”

cityfield
The article field used for the city.
Default: ‘custom_2’
Example: cityfield=“custom_6”

statefield
The article field used for the state.
Default: ‘custom_3’
Example: statefield=“custom_7”

zipfield
The article field used for the postal code.
Default: ‘custom_4’
Example: zipfield=“custom_8”

addlabel
The article field used for the label above the address on the map popup.
Default: ‘Title’
Example: addlabel=“Excerpt”

width
The width of the map in pixels.
Default: ‘500’
Example: width=“700”

height
The height of the map in pixels.
Default: ‘300’
Example: height=“500”

zoom
The map zoom level. Valid range is 1 – 17. The lower the number, the close the zoom.
Default: ‘16’
Example: zoom=“7”

controltype
The type of navigational control. Valid options are “large” and “small”. Large include the full zoom slider while small does not.
Default: ‘large’
Example: controltype=“small”

showmaptype
Indicates whether the map type switcher (map/satellite/hybrid) is shown.
Default: ‘1’
Example: showmaptype=“0”

iconcolor
The color of the icon used to designate points on the map. Uses the small icons seen on Google Ride Finder. Valid options I know of are red, orange, blue, yellow, green, purple, white.
If nothing is selected, the standard large red bubbles with a black dot seen on Google Maps will be used.
Default: ‘’
Example: iconcolor=“blue”

center
Centers the initial map view to Latitude 30 degrees and Longitude 0 degrees. If set to false, the map will be centered on the first location point.
Default: ‘0’
Example: center=“1”

Textpattern Solutions

Textpattern Solutions

Textpattern Solutions is the first book published on Textpattern.

details at friends of ED or the official book website.

buy it at amazon.com