Skip to content

Instantly share code, notes, and snippets.

@ChicagoMap
Created July 26, 2011 15:33
Show Gist options
  • Save ChicagoMap/1107034 to your computer and use it in GitHub Desktop.
Save ChicagoMap/1107034 to your computer and use it in GitHub Desktop.
KMZ Riverwalk
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: KmlLayer KML</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;
function initialize() {
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var myOptions = {
zoom: 11,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
boundary();
}
function boulevards( ) {
var boulevards = new google.maps.FusionTablesLayer({
query: {
select: 'Geocodable address',
from: '1147020'
}
});
boulevards.setMap(map);
}
function habitat( ) {
var habitat = new google.maps.FusionTablesLayer({
query: {
select: 'Geocodable address',
from: '1146852'
}
});
habitat.setMap(map);
}
function gardens( ) {
var gardens = new google.maps.FusionTablesLayer({
query: {
select: 'Geocodable address',
from: '1147026'
}
});
gardens.setMap(map);
}
function riverwalk( ) {
var riverwalk = new google.maps.FusionTablesLayer({
query: {
select: 'Geocodable address',
from: '1147027'
}
});
riverwalk.setMap(map);
}
function campusparks( ) {
var campusparks = new google.maps.FusionTablesLayer({
query: {
select: 'Geocodable address',
from: '1146938'
}
});
campusparks.setMap(map);
}
function malls( ){
var malls = new google.maps.KmlLayer('http://data.cityofchicago.org/api/file_data/zKJdf_waERT5RManxD6uP3F9WPkM8jRa4qSQ96M4gcI?filename=Kml%2520Openspaces%2520Malls%2520Plazas.kml');
malls.setMap(map);
}
function boundary( ){
var boundary = new google.maps.KmlLayer('http://data.cityofchicago.org/api/file_data/FbjscW4rNuQOuoguwcAn-EXO8wY9k7y0gijm0Od3OKc?filename=Kmlcityboundary.kml');
boundary.setMap(map);
}
function TIF( ){
var boundary = new google.maps.KmlLayer('http://www.cityofchicago.org/content/dam/city/progs/trnsprncy/Data/tif_districts.kmz');
boundary.setMap(map);
}
function TIF_KML( ){
var boundary = new google.maps.KmlLayer('http://www.cityofchicago.org/content/dam/city/progs/trnsprncy/Data/kmltifdistricts.kml');
boundary.setMap(map);
}
function TIF_Socrata( ){
var boundary = new google.maps.KmlLayer('http://data.cityofchicago.org/api/file_data/Zv3wMab7k4Sytq48pO2eo2Gd8wTCVkzqDUwJO-SdI_M?filename=Kmltifdistricts.kml');
boundary.setMap(map);
}
</script>
</head>
<body onload="initialize()">
<input type="button" value="Habitat" onclick="habitat();"/>
<input type="button" value="Boulevards" onclick="boulevards();"/>
<input type="button" value="Gardens" onclick="gardens();"/>
<input type="button" value="Riverwalk" onclick="riverwalk();"/>
<input type="button" value="Campus Parks" onclick="campusparks();"/>
<input type="button" value="Malls" onclick="malls();"/>
<input type="button" value="TIF_KMZ" onclick="TIF();"/>
<input type="button" value="TIF_KML" onclick="TIF_KML();"/>
<input type="button" value="TIF_KML_Socrata" onclick="TIF_Socrata();"/>
<div id="map_canvas"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment