Northern Rockies Highway Guide Map

Image

This was actually a project (Trans Canada Ecotour – Northern Rockies Highway Guide), not a side project. This Google Map has a few fun features: custom infowindows, custom icons, HTML elements animated with jQuery, styled map, and weather.

Advertisements

2 thoughts on “Northern Rockies Highway Guide Map

  1. anthonybalao

    Hi! good stuff right here… is it possible to customize weather infowindow, do you have a sample of that as well?

    Reply
  2. dkwiens Post author

    Hi Anthony, thanks for visiting my blog. It depends how you want to customize the infoWindow, but yes, you are able to use the weather information in different ways.

    I haven’t tried changing the infoWindow for the WeatherLayer, but here is how I do it for a FusionTablesLayer (example here, look for adminLayer):

    1.) suppress the default infoWindow

    adminLayer.setOptions({suppressInfoWindows:true});

    2.) create a custom infoWindow

    google.maps.event.addListener(adminLayer, ‘click’, function(html)
    {
    infoWindow.setContent(“new HTML here”);
    infoWindow.setPosition(html.latLng);
    infoWindow.open(map);
    })

    Looking at WeatherLayerMouseEvents, you’ll have to work featureDetails into the call, like when you get info from a KML feature, to identify exactly which feature was clicked.

    Let me know if you get an example working!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s