cf_gMapMarker

Author
Scott Bennett (www.ColdFusionGuy.com)

Description

Used with the cf_gMap tag. This tag adds a marker to the Google API powered map.

Syntax

<cf_gMapMarker
  Latitude="latitude"
  Longitude="longitude"
  Street="Street Address"
  City="City"
  State="State"
  Zip="Zip"
  Info="HTML Code"
  >

See also

cf_gMap

Attributes

Attribute Req/Opt Default Description
Latitude Required if Longitude is specified 0 The Latitude of the location you want the map to be centered on. Ignored if Longitude is not specified.
Longitude Required if Latitude is specified 0 The Longitude of the location you want the map to be centered on. Ignored if Latitude is not specified.
Street Optional   The street address (or name if it is a major landmark) of the location you want to mark on the map. Ignored if Latitude and Longitude are specified
City Optional   The city of the location you want to mark. Ignored if Latitude and Longitude are specified
State Optional   The state of the location you want to mark. Ignored if Latitude and Longitude are specified
Zip Optional   The zip/postal code of the location you want to mark. Ignored if Latitude and Longitude are specified
Info Optional   An HTML string that will be displayed in a floating window above the map when the marker is clicked. The info window looks a little like a comic-book word balloon; it has a content area and a tapered stem, where the tip of the stem is at a specified point on the map.

Usage

This tag must be used within the cf_gMap tag. When you already know the Latitude and Longitude of the location, specify those in the appropriate attributes. If you do not know the Latitude and Longitude, specify the location using the street, city, state, and zip attributes, and the map will attepmt to find the location.

Example

<cf_gMap
  GoogleAPIKey="ABQIAAAAhugggN57hOQoaz39FnjmlBRMVK3x6ViLOtpAWN1mSgg089OO2BSUk4STpxPKlccsguU0Dvqet9F3Xw"
  Latitude="33.840000"
  Longitude="-117.950000"
  ZoomLevel="10"
  MapControl="Large"
  ScaleControl=false
  MapTypeControl=true
  OverviewMapControl=true
  >
  <cf_gMapMarker
    Latitude="33.788598"
    Longitude="-117.964285"
    Info="This marker was specified by<br>using Latitude and Longitude"
    >
  <cf_gMapMarker
    Street="11889 Goodale Ave"
    City="Fountain Valley"
    State="CA"
    Zip="92708"
    Info="<b>This is where I lived when I was a kid:</b><br>11889 Goodale Ave<br>Fountain Valley, CA<br>92708"
    >
</cf_gMap>