-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colored Lines Do Not Work on Styled Google Maps #4
Comments
I think you've slightly misunderstood the map styling documentation. Your example code above doesn't override the ROADMAP style -- it just asks for a map control to toggle between ROADMAP and a custom style. This is how you add custom styles to a map, and how you then change the line colour of the spider legs:
|
Thanks a lot for the quick reply. That did the trick. I did misunderstand the Google implementation, and I didn't try to call the custom style type correctly with oms. |
No problem. Glad you got it sorted. |
If you use Google's styled maps option (http://code.google.com/apis/maps/documentation/javascript/styling.html) and try to assign a leg color (legColors.usual[mti.ROADMAP] = '#444';), the colors don't work.
When you specify a style, you override a current Google style, like ROADMAP:
var mapOptions = {
mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'custom_style_name'] }
};
So there should be some way to access this new style, but ROADMAP is not the way. Here is a test link. Click the orange marker to the right of the center marker.
http://www.yourmapper.com/mapV3.php?id=174&num=25&lat=38.23469126&lon=-85.7198380
The spiderfied lines should be blue with an orange highlight (as you can see in the Terrain view), but they are the default black with no highlight.
The text was updated successfully, but these errors were encountered: