Skip to content

Commit

Permalink
add DYMAJO maps
Browse files Browse the repository at this point in the history
close issue #40
  • Loading branch information
mjdavidson committed Oct 24, 2016
1 parent d59c82d commit 891122d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/views/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class Search extends React.Component<IAppProps, IAppState> {
className="map">
<ZoomControl position="bottomleft" />
<TileLayer
url={'https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}' + retina + token}
url={'https://maps.dymajo.com/osm_tiles/{z}/{x}/{y}.png'}
attribution='© <a href="https://www.mapbox.com/about/maps/"">Mapbox</a> | © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
/>
{this.state.stops.map((stop) => {
Expand Down
4 changes: 2 additions & 2 deletions js/views/station.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { UiStore } from '../stores/uiStore.ts'
import { SettingsStore } from '../stores/settingsStore.ts'
import TripItem from './tripitem.tsx'

const mapboxToken = 'pk.eyJ1IjoiY29uc2luZG8iLCJhIjoiY2lza3ozcmd5MDZrejJ6b2M0YmR5dHBqdiJ9.Aeru3ssdT8poPZPdN2eBtg'
const hToken = 'pk.eyJ1IjoiY29uc2luZG8iLCJhIjoiY2lza3ozcmd5MDZrejJ6b2M0YmR5dHBqdiJ9.Aeru3ssdT8poPZPdN2eBtg'

declare function require(name: string): any;
let request = require('reqwest')
Expand Down Expand Up @@ -532,7 +532,7 @@ class Station extends React.Component<IAppProps, IAppState> {

for (var i=0; i<tiles; i++) {
var index = Math.ceil(i - tiles/2)
url.push(`https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/16/${Math.floor(latLng[0])+index}/${Math.floor(latLng[1])}@2x?access_token=${mapboxToken}`)
url.push(`https://maps.dymajo.com/osm_tiles/16/${Math.floor(latLng[0])+index}/${Math.floor(latLng[1])}.png`)
}
iconPop = <div className="bgwrap">
{url.map(function(item, index) {
Expand Down
1 change: 1 addition & 0 deletions scss/_leaflet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
display: none;
margin: 0;
text-indent: -9999px;
background-position: 0 0;
Expand Down

0 comments on commit 891122d

Please sign in to comment.