-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
Adds a readme file
* removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance
* removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner
* removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * deals with time zones for feauture counts
…into update-map
const mapboxgl = process.browser ? require('mapbox-gl') : null; | ||
// Despite using mapboxgl to render the map, we still use esri-leaflet to | ||
// query to the layer | ||
const { featureLayer } = process.browser ? require('esri-leaflet') : {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a TODO
to remove that dependency and just AJAX the info in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added here: #25. Could be a good debt bash item for next week
'cob-basemap': { | ||
type: 'raster', | ||
tiles: [ | ||
'https://awsgeo.boston.gov/arcgis/rest/services/Basemaps/BostonCityBasemap_WM/MapServer/tile/{z}/{y}/{x}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
this.map.on('click', e => { | ||
// Crash and fatalitiy points are often stacked on top of eachother | ||
// in the data. We want the pop-ups to show information about all | ||
// the crashes that occured in the clicked location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fancy!
components/Map.js
Outdated
return a[1] > b[1] ? -1 : 1; | ||
}); | ||
|
||
new mapboxgl.Popup({ closeOnClickboolean: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this just be closeOnClick: true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol yes - thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* fix icon url (#14) * adds back feature counts (#16) * Add a readme (#17) Adds a readme file * Update map (#20) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * Update map (#21) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * Update map (#22) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * deals with time zones for feauture counts * Update map (#23) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * deals with time zones for feauture counts * adjust heatmap props, popups show num crashes and info about each * Updates to map component (#24) * fix icon url (#14) (#15) * adds back feature counts (#16) * Add a readme (#17) Adds a readme file * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * Update map (#20) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * Update map (#21) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * deals with time zones for feauture counts * Update map (#22) * removes lastupdated prop from div * use count method instead of length of id list for feature counts * use mapbox gl instead of leaflet for performance * clean up leaflet artifacts * make feature service urls cleaner * deals with time zones for feauture counts * adjust heatmap props, popups show num crashes and info about each * clean up code * fixed a couple typos in comments * fix closeOnClick typo * deleting extra lines/fixing what i broke (#28)
This PR: