Skip to content

Commit

Permalink
Merge pull request #48 from Hanyu-Chen/master
Browse files Browse the repository at this point in the history
Deliverable 1
  • Loading branch information
rishabnayak authored Dec 22, 2020
2 parents 7d760a8 + ba1ec72 commit 070f75a
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
16 changes: 16 additions & 0 deletions parking_lots/Deliverable_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Parking Lot Project CS506
## Deliverable 1 10/28

- Hanyu Chen
- Israel Ramirez
- Hsin-Hung Wu


About the data we have collected until right now, we tried to use Google API to get the image of vacant parcels. The first thing we did is to get the data that labeled as vacant land. We select it by using tax exempt codes. After that, we pre-processing the data, which store them as a list of locations.

The next step we have done is to obtain the images of locations, by using corresponding longitude and latitude. We tried to write a script of HTML, and use the Google API to collect them. The code is uploaded as GoogleAPI.html. However, here comes a problem. Since Google dose not allow us to store the images from Google Map, this method may violate some rules.

Due to this reason, we tried to use another database called MassGIS's Online Mapping Tool. It contains different kinds of maps and different years of map, which is more helpful to analyze the change of parking lots.

Another problem is about the raw data. In some database, we can get the location represented by longitude and latitude, but no all of the databases have this attribute. We may need to ask Mario in the next meeting.

55 changes: 55 additions & 0 deletions parking_lots/GoogleAPI.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="./html2canvas.js"></script>
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAD5sqUXPg_EwtcxoGPqHP2TOpu3dXLKIM&callback=initialize&libraries=&v=weekly"
defer>
</script>

<script>
function initialize() {
const c = new google.maps.LatLng(42.2892766443043, -71.0799505996245);
var map = new google.maps.Map(document.getElementById("googleMap"), {
center: c,
zoom: 40,
mapTypeId:google.maps.MapTypeId.SATELLITE,
disableDefaultUI:true,
});
}
// function loadScript()
// {
// var script = document.createElement("script");
// script.type = "text/javascript";
// script.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyAD5sqUXPg_EwtcxoGPqHP2TOpu3dXLKIM&sensor=false&callback=initialize";
// document.body.appendChild(script);
// }

// window.onload = loadScript;
</script>

</head>

<script>
function takeScreenshot() {
console.log("test");
html2canvas(document.querySelector("#googleMap"), {
useCORS: true,
foreignObjectRendering: true,
allowTaint: false,
taintTest: true,
scale: 1,
}).then(canvas => {document.body.appendChild(canvas)});
// html2canvas(document.getElementById('googleMap'),{
// onrendered: function(canvas) {
// document.body.appendChild(canvas);
// },
// });
}
setTimeout("takeScreenshot()",5000);
</script>

<body>
<div id="googleMap" style="width:1000px;height:800px;"></div>
</body>
</html>

0 comments on commit 070f75a

Please sign in to comment.