Skip to content

Add filename to info window on map for easier photo ID #12

Open
Elizabethcase wants to merge 12 commits intoryanseys:masterfrom
Elizabethcase:master
Open

Add filename to info window on map for easier photo ID #12
Elizabethcase wants to merge 12 commits intoryanseys:masterfrom
Elizabethcase:master

Conversation

@Elizabethcase
Copy link

(probably would be better as an option rather than default)

Displays filename along with lat/long in google map pin info window

}
}

// added ImageDescription/filename section
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var filename;

// added ImageDescription/filename section
if(!exif_data || !exif_data.ImageDescription) {
// no image description available
var filename = "No Filename";
Copy link
Owner

@ryanseys ryanseys Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop "var" here

var filename = "No Filename";
}
else {
var filename = exif_data.ImageDescription;
Copy link
Owner

@ryanseys ryanseys Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop "var" here

ctx.drawImage(this, 0, 0, imageWidth, imageHeight);
var thumbnail_data = canvas.toDataURL("image/jpeg");
addInfoWindow(marker, thumbnail_data, imageWidth, imageHeight, lat_deg, lon_deg);
addInfoWindow(marker, thumbnail_data, imageWidth, imageHeight, lat_deg, lon_deg, filename); // added filename
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

if(exif_data.thumbnail) {
// yay! thumbnail found!
addInfoWindow(marker, exif_data.thumbnail, imageWidth, imageHeight, lat_deg, lon_deg);
addInfoWindow(marker, exif_data.thumbnail, imageWidth, imageHeight, lat_deg, lon_deg, filename); // added filename
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

@ryanseys
Copy link
Owner

Thanks for the pull request! Just left a few small comments.

index.html Outdated
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8"><link rel="stylesheet" href="css/style.css" type="text/css">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;key=AIzaSyBECSPwBMmPm12XeEUhmXn6Bejl1ZsbnIo&callback=initMap"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't suggest putting the API key in GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants