2

I am trying to understand the TransitLayer in Google Maps' Javascript API. Utilizing Google's example code, I managed to display a geographically-accurate map of Tokyo Metro, Toei Subway and Yokohama Municipal Subway routes here: https://jsfiddle.net/dsd00wb0/

But what I want to do is highlight specific lines one at a time. For instance, only highlight the Asakusa Line. I can do that in Google Maps, but what I want to know is if I can specifically do it using the Google Maps API.

Moreover, how would you highlight heavy rail/overland lines like the Yamanote Line? The TransitLayer only works on subway lines.

I have been able to extract route relations for specific railway lines in OpenStreetMap (using JOSM), but Google Maps is a lot more confusing.

  • Try using the Transit side of MapTypeStyleFeatureType developers.google.com/maps/documentation/javascript/examples/… for your rail lines – Mapperz Oct 18 '16 at 0:58
  • I'm a bit confused. Do you mean use MapTypeStyleFeatureType object to display heavy rail/overland lines (e.g. Yamanote Line, Keikyu Line), or that I can use the MapTypeStyleFeatureType object to display one subway line at a time? – spillthrill Nov 6 '16 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.