-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
georss viewer and image from a lecture added
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | ||
<meta charset="utf-8"> | ||
<title>GeoRSS Layers</title> | ||
<style> | ||
body { font-family: sans-serif; } | ||
|
||
/* Always set the map height explicitly to define the size of the div | ||
* element that contains the map. */ | ||
#map { | ||
height: 90%; | ||
} | ||
/* Optional: Makes the sample page fill the window. */ | ||
html, body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
|
||
<script> | ||
var map = null; | ||
var georssLayer = null; | ||
|
||
function initMap() { | ||
map = new google.maps.Map(document.getElementById('map'), { | ||
zoom: 4, | ||
center: {lat: 49.496675, lng: -102.65625} | ||
}); | ||
} | ||
|
||
function show() { | ||
|
||
var feed = document.getElementById('feed').value; | ||
|
||
georssLayer = null; | ||
georssLayer = new google.maps.KmlLayer({ | ||
url: feed | ||
}); | ||
georssLayer.setMap(map); | ||
} | ||
|
||
</script> | ||
|
||
|
||
</head> | ||
<body> | ||
|
||
<div style="font-size:24px;height:10%;padding:10px;"> | ||
<b>Display a GeoRSS feed on a map</b> | ||
<input style="font-size:24px;" size="60" type="text" id="feed" value="http://api.flickr.com/services/feeds/geo/?g=322338@N20&lang=en-us&format=feed-georss" placeholder="URL of feed"> | ||
<button style="font-size:24px;" id="find" onclick="show();">Show</button> | ||
|
||
</div> | ||
|
||
<div id="map"></div> | ||
<script> | ||
|
||
</script> | ||
<script async defer | ||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAQvSxxYDgs7zt40H8dUftm4cOGC4GNI0Y&callback=initMap"> | ||
</script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.