Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Just a thought, do you have the most recent cumulative hotfix applied?
http://helpx.adobe.com/coldfusion/kb/cumulative-hotfix-1-coldfusion-902.html
Also I'd be interested to know the solution if you ever manage to get this resolved.