Description

The cfmapitem tag is a child tag of the cfmap tag. This tag creates markers on the map. You can specify the marker in a map using either the cfmapitem tag or using the ColdFusion.Map.AddMapMarker JavaScript API. See ColdFusion.Map.addMarker for details.

Category

Syntax

<cfmapitem 
address="address" 
latitude="latitude in degrees" 
longitude="longitude in degrees" 
markercolor="marker color" 
markericon="icon path " 
markerwindowcontent="content" 
name="name of the map" 
showmarkerwinodw="true|false" 
showUser="true|false" 
tip="marker tip" />

See also

History

ColdFusion 10: Added the attribute {{showUser}}

ColdFusion 9: Added this tag.

Attributes

Attribute

Req/Opt

Default

Description

address

Required, if latitude and longitude are not specified

 

The address of the location to set the map marker.

latitude

Required, if address is not specified

 

The latitude value for the marker, in degrees. The valid values for latitude are -90 to + 90.

longitude

Required, if address is not specified

 

The longitude value for the marker, in degrees. The valid values for longitude are -180 to + 180.

markercolor

Optional

green

The color of the marker specified as a hexadecimal value. By default, the centermarker is green in color.
The attributes markericon and markercolor are mutually exclusive.

markericon

Optional

 

Location of an image file to use as the marker icon. The attributes markericon and markercolor are mutually exclusive.

markerwindowcontent

Optional

 

Static content displayed in the marker window. This attribute ignores the markerbind attribute defined in the tag cfmap.

name

Optional

 

The name of the map.

 

showmarkerwindow

 

Optional

Inherits parent cfmap setting

If set to true, displays the marker window. If the attribute markerbind is used, unless you set this attribute to true, the marker window is not displayed.

 

showUser

 

Optional

false

If set to true, on HTML-compliant browsers, user location is shown on the map.

tip

Optional

 

A short description of the marker location that appears as a tool tip.

Usage

This tag must be used within the cfmap tag.
The following inheritance rules apply:

  • The value specified for the attribute showmarkerwindow in the cfmap tag is inherited by all cfmapitem tags.
  • A child cfmapitem tag can override the attribute showmarkerwindow in the cfmap tag by changing the value.
  • Any bind expression defined using the markerbind is ignored if the cfmapitem tag defines the attribute markerwindowcontent.

Examples

<h3>cfmapitem example using latitude and longitude attributes</h3> 
<cfmap name="gmap01" 
centerlatitude="71.094224" 
centerlongitude="42.339641" 
doubleclickzoom="true" 
overview="true" 
scrollwheelzoom="true" 
showscale="true" 
tip="My Map" 
zoomlevel="4"> 
<cfmapitem name="marker01" 
latitude="70.50" 
longitude="42.50" 
tip="New marker"/>
<h3>cfmap Example using address address</h3> 
<cfmap name="gmap02" 
centerlatitude="71.094224" 
centerlongitude="42.339641" 
doubleclickzoom="true" 
overview="true" 
scrollwheelzoom="true" 
showscale="true" 
tip="My Map" 
zoomlevel="4"> 
<cfmapitem name="marker02" 
address="345 Park Avenue, san jose, CA 95110-2704, USA" 
tip="New marker"/>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy