Skip to content

Commit

Permalink
Merge pull request #6 from redbadger/badger-pin
Browse files Browse the repository at this point in the history
Add a custom pin
  • Loading branch information
charypar authored Mar 18, 2020
2 parents b0cf8b2 + f096d7d commit cc5e81f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file added badger-pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,22 @@ <h1>Sign in to continue</h1>
function(response) {
const range = response.result;

var pinIcon = new google.maps.MarkerImage(
"./badger-pin.png",
null /* size is determined at runtime */,
null /* origin is 0,0 */,
null /* anchor is bottom center of the scaled image */,
new google.maps.Size(30, 50)
);

range.values.forEach(function(row) {
const [name, lat, lng, slack] = row;

console.log("Add marker for", name, "at", lat, lng);
const marker = new google.maps.Marker({
position: { lat: +lat, lng: +lng },
animation: google.maps.Animation.DROP,
icon: pinIcon,
map
});
const content = document.createElement("div");
Expand Down

0 comments on commit cc5e81f

Please sign in to comment.