On Jun 24, 12:54 pm, athei <[email protected]> wrote: > Hello, > I found this > examplehttp://www.geocodezip.com/v3_markers_normal_colored_infowindows.html > > In this example every beach has own color: > ['Bondi Beach', -33.890542, 151.274856, "red"], > If I type > ['Bondi Beach', -33.890542, 151.274856, "blabla"], > there is no icon "mapIcons/marker_blabla.png" and this icon wont show > up, but shadow will. > How to check if icon doesn't exist/ is missing and set for example > default marker_red.png ?
Either: 1. make sure there is a valid image for every icon "color" 2. try to get the icon image before storing it in the array (but that is more difficult to implement because the check on the image will be asynchronous you will have to wait for the response to come back from the server). 3. make a list of valid "colors" and if the argument doesn't match, use whatever you want for a "default" marker. I personally do #1. -- Larry -- 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.
