On Feb 24, 9:02 am, hob rolluk <[email protected]> wrote:
> 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) {
>

You are still not using the icon in the creation of the GMarker below.
>         var marker = new GMarker(point);
>
>
> 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...............
>
>
>       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;
>       }
>

I would suggest you look at the source your browser gets for what you
try, I don't use ColdFusion, but I don't expect what I see there to
work.  ColdFusion runs on the server, what matters is what gets to the
browser.

>
> 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.

This is one way to make it do what you want:
http://www.geocodezip.com/newmedia_leeds_ac_uk_spotsc.html

Compare it to your code and my suggestions.

  -- Larry

-- 
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