amyleew / osrm-frontend

Frontend interface for project OSRM directions
http://amyleew.github.io/osrm-frontend/
1 stars 0 forks source link

Add Emerald map over DC #4

Closed amyleew closed 9 years ago

amyleew commented 9 years ago

image

amyleew commented 9 years ago

@tristen - Adding Mapbox map ID in src/leaflet_options.js#L18-L23 + Access Token and trying npm run build getting this error:

> osrm-frontend@0.4.0 build /Users/amyleewalton/amyleew/_production/osrm-frontend
> browserify index.js | uglifyjs -c -m > bundle.js

/Users/amyleewalton/amyleew/_production/osrm-frontend/src/leaflet_options.js:20
      tileLayer: 'http://api.tiles.mapbox.com/v4/mapbox.emerald/{z}/{x}/{y}@2x.png?access_token=mapbox_access_token',
               ^

same error when I loaded ACCESS TOKEN directly.

amyleew commented 9 years ago

eventually trying to pull in a few different layer options for leaflet functionality: lrm/js/index.js#L15-L56

amyleew commented 9 years ago

@tristen - What's the best way to pass the array values for defaultView and layers?

For example in index.js#L8 how do I pass in src/leaflet_options.js#L5-L7?

Code below didn't work ....

var map = L.map('map').setView([defaultView.centerLat, defaultView.centerLng], defaultView.zoom);
amyleew commented 9 years ago

Passed in https://github.com/amyleew/osrm-frontend/commit/bed020fbf3ece0696dcce755ac38c32cfe37f313