Support Air Quality js script?
-
I am unable to get this up and running on my wordpress site. Any ideas on if this plugin will use this overlay api?
Thanks for your help.
Courtneyweb page
http://aqicn.org/faq/2015-09-18/map-web-service-real-time-air-quality-tile-api/Here is the code:
<div id=’map’ style=’height:380px;’ />
<script src=”https://maps.googleapis.com/maps/api/js”></script><script>
var map = new google.maps.Map(document.getElementById(‘map’), {
center: new google.maps.LatLng(51.505, -0.09),
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 11
});var t = new Date().getTime();
var waqiMapOverlay = new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return ‘http://tiles.aqicn.org/tiles/usepa-aqi/’ + zoom + “/” + coord.x + “/” + coord.y + “.png?token=_TOKEN_ID_”;
},
name: “Air Quality”,
});map.overlayMapTypes.insertAt(0,waqiMapOverlay);
</script>
The topic ‘Support Air Quality js script?’ is closed to new replies.