mapquest - leaflet integration with openweathermap api -


kindly check output here can here me out tutorial or ways integrate openweathermap api leaflet mapquest api. read on owm website both compatible , can work together. appreciated. !

<html> <head> <script src="https://api.mqcdn.com/sdk/mapquest-js/v1.0.0/mapquest.js"></script>     <link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.0.0/mapquest.css"/>      <script type="text/javascript">     window.onload = function() {         l.mapquest.key = 'mapquestkeyhere';          var map = l.mapquest.map('map', {           center: [40.7128, -74.0059],           layers: l.mapquest.tilelayer('map'),           zoom: 11,          });         var latlong = [                         [40.783060, -73.971249],                         [40.7128, -74.0059],                         [40.678178, -73.944158]                        ];         var infowindow = ["manhattan","ny","brooklyn"];          for(var = 0; < latlong.length ; i++){         var marker = l.marker(latlong[i]).addto(map);         marker.bindpopup(infowindow[i]).openpopup();          }         var polyline = l.polyline(latlong,{color:'red'}).addto(map);         <!-- map.addlayer(l.mapquest.trafficlayer());          <!-- map.addlayer(l.mapquest.incidentslayer());           map.addlayer(new l.tilelayer("http://tile.openweathermap.org/map/precipitation_new/{z}/{x}/{y}.png?appid=owmkeyhere"));     }         </script> </head> <body> <div id="map" style="width: 100%; height: 100%;"></div> </body> </html> 

i added following line basic mapquest.js sample in mapquest developer network.

map.addlayer(new l.tilelayer("http://tile.openweathermap.org/map/precipitation_new/{z}/{x}/{y}.png?appid=your_key"));


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -