Skip to content

Commit

Permalink
Fixed map name discrepancy
Browse files Browse the repository at this point in the history
Used buildings getter to pull building name from database instead of from Openstreetmap. This fixed the Arnold Cafeteria vs Arnold Dining Hall issue, as well as removed the need for hardcoding 'OSU Operations' building name.
  • Loading branch information
s-egge committed Dec 2, 2023
1 parent ada8fb7 commit 39556c9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/map/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,14 @@ export default {
this.building_compare_error = false
this.polyClick( e.target.feature.properties.id, e.target.feature, layer.getBounds().getCenter() )
} )
layer.on( 'mouseover', function ( e ) {
if ( !e.target.setStyle ) return
if ( e.target.feature.id === 'way/1100972272' ) {
e.target.feature.properties.name = 'OSU Operations'
}
layer.on( 'mouseover', e => {
if ( !e.target.setStyle ) return
e.target.oldStyle = {
fillColor: e.target.options.fillColor,
color: e.target.options.color
}
e.target.setStyle( { fillColor: '#000', color: '#000' } )
e.target.bindTooltip( e.target.feature.properties.name ).openTooltip()
e.target.bindTooltip( this.$store.getters['map/building']( e.target.feature.properties.id ).name ).openTooltip()
} )
layer.on( 'mouseout', e => {
if ( !e.target.setStyle ) return
Expand Down

0 comments on commit 39556c9

Please sign in to comment.