Map marker color-shift?

265 views
Skip to first unread message

JFrancis

unread,
Jan 17, 2013, 3:42:08 PM1/17/13
to google-map...@googlegroups.com
Has anyone else noticed a shift in the color of a marker when placed on a map, and the same image when it is inserted onto a web page? I'm looking at a map where I have several makers of different colors next to a "legend" describing each of the markers, and the markers on the map are decidedly darker than the ones in the legend, the point where my orange marker almost looks red!

I am using PNGs for the markers; should I be using GIFs instead?

JF

Michael Geary

unread,
Jan 17, 2013, 4:05:31 PM1/17/13
to google-map...@googlegroups.com
One guess is that there is some transparency used in one of the two cases but not the other.

Do you have a test page that shows this effect in action? I'd be curious to take a look at it. Even a screenshot would be somewhat helpful, to see the actual colors in question.

Which one has the actual correct color of your image: the marker on the map or in the web page content?

Here's a good tool to look at stuff on the screen:


It lets you zoom in to see individual pixels, and if you roll the mouse around it will show you the color value under the mouse pointer, in either hex or RGB format. (Right click the titlebar and select the format from the Options dialog.)

-Mike



--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/gOHzp93F7cgJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

JFra...@mge.com

unread,
Jan 17, 2013, 4:27:33 PM1/17/13
to google-map...@googlegroups.com

I will get a page on the web you can see. In the mean time, interestingly, I pasted the KML into the search bar at maps.google.com:

http://www.mge.com/MyAccount/outage/datafiles/MGEOutageMap_ColorShapes3.kml

Comparing the color of the pins on the left to those on the map shows a clear difference between the two. Yet, the legend and the map are pulling the URL of the marker from the exact same location, are they not?

JF




Michael Geary <m...@mg.to>
Sent by: google-map...@googlegroups.com

01/17/2013 03:06 PM


To
google-map...@googlegroups.com
cc
Subject
Re: [Google Maps API v3] Map marker color-shift?


Rossko

unread,
Jan 17, 2013, 4:55:29 PM1/17/13
to google-map...@googlegroups.com

Comparing the color of the pins on the left to those on the map shows a clear difference between the two.
 
Your KML includes a colour changing element
    <Style id="ORANGE_POINT">
        <IconStyle>
        <color>ff0080ff</color>
        <Icon><href>http://www.....
See
"The color specified in the <color> element of <IconStyle> is blended with the color of the <Icon>"
Your <color> will make the Orange icon more Red ...
 
I wouldn't like to say if that colour caste is applied to the Maps-generated legend as well, but I'll bet it isn't.  It certainly won't be applied if you just show the icon image in a regular webpage.
Just remove the <color> elements from your <IconStyle>s.
 

JFra...@mge.com

unread,
Jan 22, 2013, 11:03:39 AM1/22/13
to google-map...@googlegroups.com

That's got it. Thanks!

So, is the point of being able to specify a color so you can re-use a single, neutral-color icon, and apply "tints" to it via the KML when it is rendered on a map?

JF




Rossko <ros...@culzean.clara.co.uk>
Sent by: google-map...@googlegroups.com

01/17/2013 03:55 PM


To
google-map...@googlegroups.com
cc
Subject
Re: [Google Maps API v3] Map marker color-shift?


Reply all
Reply to author
Forward
0 new messages