ok i did some work on this this morning and started over with mikes code again... http://www.mototips.com/sample/sample.html So now i have my map and its using custom icons.
Now I am wondering how I can change my xml file http://www.mototips.com/sample/custom.xml I would like to add a link back to a page within the info window. I tried using <![CDATA[<a href="http://www.mototips.com">Place Holder Link</a>]]> and I tried using Xlink but when ever i use either of those the markers vanish from the map. On Jun 11, 5:04 am, "geocode...@gmail.com" <geocode...@gmail.com> wrote: > On Jun 11, 12:25 am, mototips <jambo.thomp...@gmail.com> wrote: > > > ok so i defined it the way the others are done and im still getting an > > undefined error in the same area... > > var xmlcellicontype = xmlrow.getElementsByTagName("icontype")[0]; > > var celltexticontype = xmlcellicontype.firstChild.data; > > > ie says icontype is undefined.... > > That's because it is undefined, you now create these variables: > var xmlcellicontype = xmlrow.getElementsByTagName("icontype")[0]; > var celltexticontype = xmlcellicontype.firstChild.data; > > but still call your createMarker function with "icontype" (which > doesn't exist): > var marker = createMarker(point,htmlString,icontype); > > BTW - I would suggest using the Google Maps API browser "independent" > GXml.value(...) rather than .firstChild.data > > -- Larry > > > I updated the code at > > http://www.mototips.com/sample/sample.html > > > > > > > On Jun 11, 12:09 am, "geocode...@gmail.com" <geocode...@gmail.com> > > wrote: > > > > On Jun 11, 12:07 am, mototips <jambo.thomp...@gmail.com> wrote: > > > > > Yes larry what i want it to do is read that value in my xml file and > > > > from there it will display the icon... That way in the future i can > > > > have different icon types and keep everything in the same xml file. > > > > Why does it not understand what im trying to make it do right now? > > > > Did you see my earlier post: > > > ================================================ > > > IE6 reports: > > > Line:72 > > > Error: 'markers' is undefined > > > > The only mention I see of markers on your page is on line 73 (IE has > > > trouble counting lines): > > > > var icontype = parseInt(markers[i].getAttribute("icontype")); > > > > I suspect you want that to reference the array of xml elements > > > "xmlrow" like all the other lines do. > > > ================================================ > > > > -- Larry > > > > > On Jun 11, 12:00 am, "geocode...@gmail.com" <geocode...@gmail.com> > > > > wrote: > > > > > > On Jun 10, 11:58 pm, mototips <jambo.thomp...@gmail.com> wrote: > > > > > > > Now I am just very confused... My new updated code is still not > > > > > > working but i am so lost at this point i really dont know what to > > > > > > say... > > > > > > A good start would be to stop posting huge code dumps, the link to the > > > > > page that exhibits the problem is much better. > > > > > > -- Larry > > > > > > > You can view that there is no marker > > > > > > shownhttp://www.mototips.com/sample/sample.htmlhttp://www.mototips.com/sam...<< > > > > > > shows a marker just not the custom > > > > > > one... But the sample.html code has come much further then this > > > > > > orginal.... > > > > > > > I need this explained to me like i am a newbie. > > > > > > Thank you every one for your help so far and your help in the > > > > > > future. > > > > > > Look forward to hearing from you all :) > > > > > > > On Jun 10, 11:42 pm, Mike Williams <nos...@econym.demon.co.uk> > > > > > > wrote: > > > > > > > > You have two functions with the same name. The one that actually > > > > > > > gets > > > > > > > executed (in Firefox) is this one: > > > > > > > > function createMarker(point,html) { > > > > > > > var marker = new GMarker(point); > > > > > > > GEvent.addListener(marker, "click", function() { > > > > > > > marker.openInfoWindowHtml(html); > > > > > > > }); > > > > > > > return marker; > > > > > > > } > > > > > > > > Note also that your other createMarker function expects to be > > > > > > > passed > > > > > > > three arguments, and it doesn't return a reference to the marker, > > > > > > > and > > > > > > > it's out of scope when you make the call > > > > > > > var marker = createMarker(point,htmlString); > > > > > > > > -- > > > > > > > Mike Williamshttp://econym.org.uk/gmap --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to Google-Maps-API@googlegroups.com To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---