Skip to main content
Participating Frequently
November 6, 2013
Question

cfmap not displaying marker

  • November 6, 2013
  • 1 reply
  • 789 views

Using cfmap in version 9.02 to work with Google maps v3.

Location is displayed correctly.  Address is obtained from a query Cannot obtain a marker on the map using below code.

            <cfmap

            centeraddress="#google_address#"

            name="locationmap"

            height="350"

            type="map"

            zoomlevel="15"

            scrollwheelzoom="true"

            doubleclickzoom="true"

            continuouszoom="true"

            overview="true"

            zoomcontrol="large"

            showmarkerwindow="true"

            showcentermarker="true"

            showscale="true"

            showallmarkers="true"

            hideborder="true"

            typecontrol="advanced">

  

            <cfmapitem name="marker01"

            address="#google_address#"

            showmarkerwindow="true"

            markerwindowcontent="#google_address#"

            />

            </cfmap>

Any help is appreciated.

Thanks,  Pam

This topic has been closed for replies.

1 reply

Participating Frequently
November 7, 2013

According to the documentation, the (optional) 'name' attribute of <cfmapitem> should be the name of the map, not of the marker.  Try this (or just remove it completely):

<cfmapitem name="locationmap"

            address="#google_address#"

            showmarkerwindow="true"

            markerwindowcontent="#google_address#"

            />

Although the examples on that same page then does exactly as you've done, use the name attribute to give names to the markers.  So I'm not sure my solution is correct or not!

Alternatively you could try using the addMarker function:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS0ef8c004658c1089-6262c847120f1a3b244-7fe2.html

AAOSAuthor
Participating Frequently
November 7, 2013

Tried it both ways - with name the same as the name if cfmap and removing the name.  Still no marker.

Tried the addMarker function and still no marker

Participating Frequently
November 7, 2013

In my opinion CFMap is one of the least useful tags available in CFML.  Dump it and write the javascript yourself directly; it's fairly straightforward and gives you much more flexibility.