Jump to content

Using Google maps with Weather js


stormtracker

Recommended Posts

Hello with this function i would like to add city and towns locations and add the iso bars like on this website site witch i have key for Willy Weather how can set this up using the get Element


 

Kind regards Michael

<script>
		    function initmap() {
			    var location =  {lat: -25.363, lng: 131.044};
				var map = new google.maps.Map(document.getElementById("map")),{
				    zoom:4,
					center: location
					});
				}		
		google.maps.event.addDomListener(document.getElementById('weather'),
    'click', function() {
        if ( weatherDisplayIsOn ) {
            weatherLayer.setMap( null );
            weatherDisplayIsOn = false;
        }
        else {
            weatherLayer.setMap( map );
            weatherDisplayIsOn = true;
        }
    });
		</script>
		<script>
		function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
                new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
                j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
                '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
            })(window,document,'script','dataLayer','GTM-54MN4R');
		</script>

 

Edited by stormtracker
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...