I think I understand what you are saying and have tested a few
variations of my code accordingly but still not.

I tired:

        function createMarker(point,html,icon) {


        var marker = new GMarker(point);

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

     var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(53.50, -5.00), 7);
        map.setUIToDefault();


<cfoutput query="showspots">
  <cfset icon='#spot_type#Icon'>
       var point = new GLatLng(#lat#,#lng#);

      var marker = createMarker(point,'#spot_name#<br><img src="images/
#pic1#"><br>#description#<br>#bust_rating#<br>#overall_rating#<br>Added
by: #userfname# #userlname# #userid#',icon };



          map.addOverlay(new GMarker(point, markerOptions));
      </cfoutput>


    }



The above adds icon to the create marker..... function
createMarker(point,html,icon) the sets icon to be #spot_type#Icon and
calls it at the end
...var marker = createMarker(point,'#spot_name#<br><img src="images/
#pic1#"><br>#description#<br>#bust_rating#<br>#overall_rating#<br>Added
by: #userfname# #userlname# #userid#',icon };




I then tried...............

 <cfoutput query="showspots">

      function createMarker(point,html, icon) {
           markerOptions = { icon:#spot_type#Icon };
        var marker = new GMarker(point);

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

     var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(53.50, -5.00), 7);
        map.setUIToDefault();



       var point = new GLatLng(#lat#,#lng#);

      var marker = createMarker(point,'#spot_name#<br><img src="images/
#pic1#"><br>#description#<br>#bust_rating#<br>#overall_rating#<br>Added
by: #userfname# #userlname# #userid#', icon)


          map.addOverlay(marker);
      </cfoutput>

so the marker options is inside the create marker function...again no
joy.

Im completely clueless as to the difference between
map.addOverlay(marker); and  map.addOverlay(new GMarker(point,
markerOptions)); maybe this is the issue.  Thankyou for all your help
so far.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to