Skip to content

jacobpmeyer/RooMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RooMap

Live link

https://roomap.jacobmeyer.dev/

Instructions

To interact with the map, simply click or tap any of the stages or tents(and even some other locations). A photo and some information about the location will apear to help you find your way around the venue a little more easily.

Technologies

  • Javascript
  • HTML/CSS

Challenges

Getting the map to focus on the location point from anywhere that they might be viewing the map was the most challenging. In the end, the desired result was achieved by mulptiplying the page width by the percentage from left that the box is, then adding that to the difference of the event offsetX and the event x.

calculate({ offsetX, x }, base) {
    const val = offsetX - x + base;
    return val;
  }

kaliope(event) {
  // leftOff is the percentage away from the left the box is times the screen width.
  let leftOff = this.pageWidth * 0.08;
  let offsetX = event.offsetX + leftOff;
  let coordX = -85;
  // coordY is the percentage away from the top the start of the
  let coordY = 85;
  const val = this.calculate({ offsetX, x: event.x }, coordX);
  this.img.src = "https://github.com/jacobpmeyer/RooMap/blob/master/images/kaliope.jpg?raw=true";
  return (this.bg.style.backgroundPosition = `${val}px ${coordY}%`);
}

To-dos

  • Collect more location photos
  • Add more landmarks to select

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published