sorry, sorry,
I forgot the link to the pages....
This one works, but all markers are green type and they are not
changing with type as I would .-(((((
http://pinzerik.altervista.org/map_OK.php
This one is not working, and should change with type, using this code
var temp_marker = new GMarker(location, {customIcons[tipo],
zIndexProcess:markerOrder});
http://pinzerik.altervista.org/map_KO.php
Where's the error???
Thank you in advice
On 1 Set, 16:41, pinzerik <[email protected]> wrote:
> Thank you for the advice; you are right, I found the right part of the
> code.
>
> I modified that part like this:
>
> function newMarker(location, html, iconcolor,
> iconnum, iconsize) {
>
> var customicon = [];
> customicon["type A"] = iconRed;
> customicon["type B"] = iconBlue;
> customicon["type C"] = iconGreen;
> customicon["type D"] = iconOrange;
>
> var iconRed = new GIcon();
> iconRed.image = 'imgs/red.png';
> iconRed.shadow = 'imgs/shadow.png';
> iconRed.iconSize = new GSize(12, 20);
> iconRed.shadowSize = new GSize(22,
> 20);
> iconRed.iconAnchor = new GPoint(6,
> 20);
> iconRed.infoWindowAnchor = new
> GPoint(5, 1);
>
> var iconBlue = new GIcon();
> iconBlue.image = 'imgs/blue.png';
> iconBlue.shadow = 'imgs/shadow.png';
> iconBlue.iconSize = new GSize(12, 20);
> iconBlue.shadowSize = new GSize(22,
> 20);
> iconBlue.iconAnchor = new GPoint(6,
> 20);
> iconBlue.infoWindowAnchor = new
> GPoint(5, 1);
>
> var iconGreen = new GIcon();
> iconGreen.image = 'imgs/green.png';
> iconGreen.shadow = 'imgs/shadow.png';
> iconGreen.iconSize = new GSize(12,
> 20);
> iconGreen.shadowSize = new GSize(22,
> 20);
> iconGreen.iconAnchor = new GPoint(6,
> 20);
> iconGreen.infoWindowAnchor = new
> GPoint(5, 1);
>
> var iconOrange = new GIcon();
> iconOrange.image = 'imgs/orange.png';
> iconOrange.shadow = 'imgs/shadow.png';
> iconOrange.iconSize = new GSize(12,
> 20);
> iconOrange.shadowSize = new GSize(22,
> 20);
> iconOrange.iconAnchor = new GPoint(6,
> 20);
> iconOrange.infoWindowAnchor = new
> GPoint(5, 1);
>
> var temp_marker = new GMarker(location,
> customicon[type]);
>
> but icons do not change depending on type!!
>
> For a try, if I change
> var temp_marker = new GMarker(location, customicon[type]);
> with
> var temp_marker = new GMarker(location, iconGreen);
> I can see allmarkersin green type: so the code is working but cannot
> recognize the type.....
>
> Where's the trick?!?!
> Thank you very much for the support
>
> On 28 Ago, 19:35, Rossko <[email protected]> wrote:
>
> > > I'm trying to personalize Nate's code to have different marker types
> > > depending on type.
> > > I cannot understand the use of iconcolor, iconnum, iconsize in
> > > newMarker function
> > > function newMarker(location, html, iconcolor, iconnum, iconsize)
>
> > That's what happens when you blindly copy code.
> > This looks like a useful line to figure out -
> > customicon.image = window.sharedFilesURL + 'markers/' + iconsize
> > +'/'+ iconcolor +'/'+ iconnum +'.png';
>
> > iconcolor, iconnum, iconsize are strings used to index into a library
> > of icon images in png format.
>
> > Your own image library would probably have different naming
> > conventions, so you'd adapt that line to do what you need.
>
> > There's some other things going to adjust sizing too, you may or may
> > not need that, who knows.
>
> > A generalised approach is offered here
> > -http://econym.org.uk/gmap/basic16.htm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---