On Dec 29, 6:31 pm, Iam Anonymous <[email protected]> wrote: > I have an application that creates a map as a single html file that I want > to be able to archive and to email to people. An implication of this is > that it can't reference other files because those files won't be present > when the html file is opened by the recipient. > > So ... now I would like to customize the marker icons. The only way I can > see to do this is by referencing web urls that will be reliable over time. > This is especially important because from testing I see that if a custom > marker link is broken I don't get the default marker. I get nothing. > > I have found a couple of icon libraries at Google, > likehttp://gmaps-samples.googlecode.com/svn/trunk/markers/but the > "gmaps-samples" portion of the link does not give me a sense of permanence. > I would like something more like "guaranteed-icons/google.com" :-) > > Is there such a thing as a permanent icon library, preferably maintained by > Google?
Nothing is permanent on the web. Your best option is to put the icons on a webserver/url owned by you and leave it up forever. Google's icons have been pretty stable in a couple of places: 1. the "google earth icons" Mike Williams references in his tutorial: http://econym.org.uk/gmap/geicons.htm 2. they have icons in several places on www.google.com and maps.google.com which have been fairly stable, but as pamela indicated when she provided a list: http://groups.google.com/group/google-maps-api/msg/5a07a33dd0281b45 they could disappear at any time. > > Also, is there some way I can test a link within the Javascript to determine > whether the icon is there or not? I have seen algorithms discussed in various places on the web, I haven't implemented any myself as I haven't deemed it worthwhile for my applications. A couple that I seem to remember: 1. use xmlhttp to attempt to get the image, check its return value 2. add an onload call back to the image, verify that it happens -- Larry > I am relatively new to the language but > if I could do this, then I could omit the "icon:" reference to a missing > icon and let the map revert to the Google default. > > TIA -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
