On Dec 8, 5:16 pm, Ryan Wood <[email protected]> wrote:
> So it is impossible to change the default icon when you are using
> custom icons?

The default icon is the default icon (that red marker with the dot).
You can't change it.  You can make it so your map uses something else
as the default (if you don't specify one).  That is just code, and
that is what my example does, I thought I was pretty clear, oh well...

> Lets say I want a customiconA to display when x=1, and
> the rest, where x=anything other than 1, to be customiconB.
>
> Basically saying that if x does not equal one, then for all other
> markers display customiconB. Only display customiconA when x=1.
>
>       var customIcons = {
>       x=1: {
>         icon: 'customiconA'
>       },
>
>       x=all other than 1: {
>         icon: 'customiconB '
>       }
>     };
>
> On Dec 8, 12:52 pm, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Dec 8, 9:32 am, Ryan Wood <[email protected]> wrote:
>
> > > Is there a way to use custom icons, where you can set all other
> > > entries as another icon?
>
> > > Meaning:
>
> > >         var customIcons = {
> > >       **ALL**: {
> > >         icon: 'arrestlist/markers/bluesq3.png',
> > >       },
> > >       DUI: {
> > >         icon: 'arrestlist/markers/dui.png',
> > >       }
> > >     };
>
> > > Where **ALL* dictates that everything other than DUI will be a set
> > > icon?
>
> > > Or is there a way to simply set the default icon from the red google
> > > icon to something else?
>
> > Not really.  You can code it to do that though.  Most of my maps with
> > custom markers use a "red" marker (not _the_ red marker) as the
> > default, like this one:http://www.geocodezip.com/v3_markers_colored.html
>
> > adding this entry to the array:
> >   ['test place', -34.0, 151.2, 0, null]
> > creates a red marker.
>
> >   -- Larry
>
> > > Here is my page with example of using custom icon for DUI and the
> > > other icons being default 
> > > google:http://www.legalgrab.com/florida_arrest_map3.html
>
> > > Any help is greatly appreciated!
>
> > > On Dec 7, 4:46 pm, Ryan Wood <[email protected]> wrote:
>
> > > > This is what happens when I set custom icons to display something
> > > > different when charge=DUI.
>
> > > >http://www.legalgrab.com/florida_arrest_map3.html
>
> > > > notice though, that all other icons are the default google icon. How
> > > > do I change the default icon but still keep the custom icon
> > > > charge=DUI?
>
> > > > This is where I simply change the default icon, not implementing
> > > > custom icon:http://www.legalgrab.com/florida_arrest_map.html
>
> > > > On Dec 7, 4:34 pm, CroNiX <[email protected]> wrote:
>
> > > > > Do you have some sort of test condition to determine when to use which
> > > > > icon?
>
> > > > > var customIcon = (some test if DUI) ? 'arrestlist/markers/dui.png' :
> > > > > 'arrestlist/markers/bluesq3.png';
>
> > > > > var marker = new google.maps.Marker({
> > > > >             map: map,
> > > > >             position: point,
> > > > >             icon: customIcon
>
> > > > > });
>
> > > > > On Dec 7, 11:26 am, Ryan Wood <[email protected]> wrote:
>
> > > > > > Hi,
>
> > > > > > I am trying to use custom icons and at the same time change the
> > > > > > default custom icon. Basically, I want to have my own default icon,
> > > > > > and at the same time use a different default icon.
>
> > > > > > My current code is:
>
> > > > > >         var customIcons = {
> > > > > >       all other than DUI: {
> > > > > >         icon: 'arrestlist/markers/bluesq3.png',
>
> > > > > >       },
> > > > > >       DUI: {
> > > > > >         icon: 'arrestlist/markers/dui.png',
>
> > > > > >       }
> > > > > >     };
>
> > > > > > var marker = new google.maps.Marker({
> > > > > >             map: map,
> > > > > >             position: point,
> > > > > >             icon: icon.icon
> > > > > >           });
>
> > > > > > I am trying to use a custom marker for charge=DUI. It works when I 
> > > > > > use
> > > > > > icon: icon.icon, but all of my other icons are the default red 
> > > > > > google
> > > > > > icon.
>
> > > > > > How can I replace the google default icon, and still use the icon:
> > > > > > icon.icon code?
>
> > > > > > I have tried searching everywhere but cannot nail it down.
>
> > > > > > Thanks in advance!- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

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

Reply via email to