-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from conveyal/dev
v0.7.0
- Loading branch information
Showing
83 changed files
with
11,108 additions
and
3,245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ignore] | ||
.*/node_modules/auth0-lock/.* | ||
.*/node_modules/config-chain/.* | ||
.*/node_modules/npmconf/.* | ||
.*/node_modules/mapbox.js/docs/examples/.* | ||
.*/node_modules/react-leaflet/src/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[options] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ assets | |
configurations/* | ||
!configurations/default | ||
!configurations/messages | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/* global jest, module, require */ | ||
|
||
import assign from 'lodash/assign' | ||
|
||
const L = require.requireActual('leaflet') | ||
const LeafletMock = jest.genMockFromModule('leaflet') | ||
|
||
class ControlMock extends LeafletMock.Control { | ||
constructor (options) { | ||
super() | ||
this.options = {...L.Control.prototype.options, ...options} | ||
} | ||
|
||
getPosition () { | ||
return this.options.position | ||
} | ||
|
||
setPosition (position) { | ||
this.options.position = position | ||
return this | ||
} | ||
} | ||
|
||
const controlMock = options => new ControlMock(options) | ||
|
||
class LayersControlMock extends ControlMock { | ||
constructor (baseLayers = [], overlays = [], options) { | ||
super(options) | ||
this._layers = [] | ||
|
||
baseLayers.forEach((layer, i) => { | ||
this._addLayer(layer, i) | ||
}) | ||
overlays.forEach((layer, i) => { | ||
this._addLayer(layer, i, true) | ||
}) | ||
} | ||
|
||
_addLayer (layer, name, overlay) { | ||
this._layers.push({layer, name, overlay}) | ||
} | ||
|
||
addBaseLayer (layer, name) { | ||
this._addLayer(layer, name) | ||
return this | ||
} | ||
|
||
addOverlay (layer, name) { | ||
this._addLayer(layer, name, true) | ||
return this | ||
} | ||
|
||
removeLayer (obj) { | ||
this._layers.splice(this._layers.indexOf(obj), 1) | ||
} | ||
} | ||
|
||
ControlMock.Layers = LayersControlMock | ||
controlMock.layers = (baseLayers, overlays, options) => { | ||
return new LayersControlMock(baseLayers, overlays, options) | ||
} | ||
|
||
class MapMock extends LeafletMock.Map { | ||
constructor (id, options = {}) { | ||
super() | ||
assign(this, L.Mixin.Events) | ||
|
||
this.options = {...L.Map.prototype.options, ...options} | ||
this._container = id | ||
|
||
if (options.bounds) { | ||
this.fitBounds(options.bounds, options.boundsOptions) | ||
} | ||
|
||
if (options.maxBounds) { | ||
this.setMaxBounds(options.maxBounds) | ||
} | ||
|
||
if (options.center && options.zoom !== undefined) { | ||
this.setView(L.latLng(options.center), options.zoom) | ||
} | ||
} | ||
|
||
_limitZoom (zoom) { | ||
const min = this.getMinZoom() | ||
const max = this.getMaxZoom() | ||
return Math.max(min, Math.min(max, zoom)) | ||
} | ||
|
||
_resetView (center, zoom) { | ||
this._initialCenter = center | ||
this._zoom = zoom | ||
} | ||
|
||
fitBounds (bounds, options) { | ||
this._bounds = bounds | ||
this._boundsOptions = options | ||
} | ||
|
||
getBounds () { | ||
return this._bounds | ||
} | ||
|
||
getCenter () { | ||
return this._initialCenter | ||
} | ||
|
||
getMaxZoom () { | ||
return this.options.maxZoom === undefined ? Infinity : this.options.maxZoom | ||
} | ||
|
||
getMinZoom () { | ||
return this.options.minZoom === undefined ? 0 : this.options.minZoom | ||
} | ||
|
||
getZoom () { | ||
return this._zoom | ||
} | ||
|
||
setMaxBounds (bounds) { | ||
bounds = L.latLngBounds(bounds) | ||
this.options.maxBounds = bounds | ||
return this | ||
} | ||
|
||
setView (center, zoom) { | ||
zoom = zoom === undefined ? this.getZoom() : zoom | ||
this._resetView(L.latLng(center), this._limitZoom(zoom)) | ||
return this | ||
} | ||
|
||
setZoom (zoom) { | ||
return this.setView(this.getCenter(), zoom) | ||
} | ||
} | ||
|
||
class PopupMock extends LeafletMock.Popup { | ||
constructor (options, source) { | ||
super() | ||
assign(this, L.Mixin.Events) | ||
|
||
this.options = {...L.Popup.prototype.options, ...options} | ||
this._source = source | ||
} | ||
|
||
getContent () { | ||
return this._content | ||
} | ||
|
||
setContent (content) { | ||
this._content = content | ||
} | ||
} | ||
|
||
module.exports = { | ||
...LeafletMock, | ||
Control: ControlMock, | ||
control: controlMock, | ||
LatLng: L.LatLng, | ||
latLng: L.latLng, | ||
LatLngBounds: L.LatLngBounds, | ||
latLngBounds: L.latLngBounds, | ||
geoJson (data, props) { | ||
return { | ||
data, | ||
getLayers () { | ||
return [] | ||
}, | ||
props | ||
} | ||
}, | ||
Map: MapMock, | ||
map: (id, options) => new MapMock(id, options), | ||
Popup: PopupMock, | ||
popup: (options, source) => new PopupMock(options, source) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* global jest */ | ||
const ReactLeaflet = require.requireActual('react-leaflet') | ||
const ReactLeafletMock = jest.genMockFromModule('react-leaflet') | ||
|
||
ReactLeaflet.ZoomControl = ReactLeafletMock.ZoomControl | ||
|
||
module.exports = ReactLeaflet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ entries: | |
env: development | ||
flyle: true | ||
s3bucket: taui | ||
serve: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,50 @@ | ||
browsochrones: | ||
active: base | ||
base: null | ||
comparison: null | ||
active: 0 | ||
instances: [] | ||
gridsUrl: https://dz69bcpxxuhn6.cloudfront.net/indy-baseline-z9/intgrids | ||
grids: | ||
- Jobs_total | ||
- Workers_total | ||
origins: | ||
- https://dz69bcpxxuhn6.cloudfront.net/indyconnect-marion-v6 | ||
- https://dz69bcpxxuhn6.cloudfront.net/indy-baseline-v6 | ||
- name: Baseline | ||
url: https://dz69bcpxxuhn6.cloudfront.net/indy-baseline-v6 | ||
- name: Marion | ||
url: https://dz69bcpxxuhn6.cloudfront.net/indyconnect-marion-v6 | ||
destinations: [] | ||
geocoder: | ||
focusLatlng: | ||
lat: 39.7691 | ||
lng: -86.1570 | ||
boundary: | ||
country: us | ||
rect: | ||
maxLatlng: | ||
lat: 40.271143686084194 | ||
lng: -85.462646484375 | ||
minLatlng: | ||
lat: 39.35978526869001 | ||
lng: -86.8524169921875 | ||
maxLat: 40.271143686084194 | ||
maxLon: -85.462646484375 | ||
minLat: 39.35978526869001 | ||
minLon: -86.8524169921875 | ||
pointsOfInterest: | ||
- name: Location 1 | ||
coordinates: [-86.1570, 39.7691] | ||
- name: Location 2 | ||
coordinates: [-86.1580, 39.7681] | ||
map: | ||
active: base | ||
active: 0 | ||
centerCoordinates: [39.7691, -86.1570] | ||
geojson: [] | ||
zoom: 11 | ||
transitive: null | ||
isochrones: [] | ||
transitives: [] | ||
travelTimes: [] | ||
inVehicleTravelTimes: [] | ||
waitTimes: [] | ||
zoom: 11 | ||
mapMarkers: | ||
start: {} | ||
end: {} | ||
timeCutoff: | ||
selected: 60 | ||
times: [] | ||
ui: | ||
fetches: 0 | ||
showLog: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
BROWSOCHRONES_BASE_URL: | ||
LEAFLET_TILE_URL: | ||
LEAFLET_RETINA_URL: | ||
LEAFLET_ATTRIBUTION: | ||
MAPBOX_ACCESS_TOKEN: | ||
MAPZEN_SEARCH_KEY: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// flow-typed signature: 351afdb4dc19c4d3a1be1ffa1fa58d3f | ||
// flow-typed version: <<STUB>>/@conveyal/lonlat_v^1.1.1/flow_v0.45.0 | ||
|
||
/** | ||
* This is an autogenerated libdef stub for: | ||
* | ||
* '@conveyal/lonlat' | ||
* | ||
* Fill this stub out by replacing all the `any` types. | ||
* | ||
* Once filled out, we encourage you to share your work with the | ||
* community by sending a pull request to: | ||
* https://github.com/flowtype/flow-typed | ||
*/ | ||
|
||
declare module '@conveyal/lonlat' { | ||
declare module.exports: any; | ||
} | ||
|
||
/** | ||
* We include stubs for each file inside this npm package in case you need to | ||
* require those files directly. Feel free to delete any files that aren't | ||
* needed. | ||
*/ | ||
declare module '@conveyal/lonlat/index.test' { | ||
declare module.exports: any; | ||
} | ||
|
||
// Filename aliases | ||
declare module '@conveyal/lonlat/index' { | ||
declare module.exports: $Exports<'@conveyal/lonlat'>; | ||
} | ||
declare module '@conveyal/lonlat/index.js' { | ||
declare module.exports: $Exports<'@conveyal/lonlat'>; | ||
} | ||
declare module '@conveyal/lonlat/index.test.js' { | ||
declare module.exports: $Exports<'@conveyal/lonlat/index.test'>; | ||
} |
Oops, something went wrong.