diff options
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/MainMap.js | 13 | ||||
-rw-r--r-- | modern/src/reducers/index.js | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/modern/src/MainMap.js b/modern/src/MainMap.js index fab17777..5a096c53 100644 --- a/modern/src/MainMap.js +++ b/modern/src/MainMap.js @@ -18,10 +18,11 @@ class MainMap extends Component { const position = [this.state.lat, this.state.lng] const markers = this.props.positions.map(position => - <DivIcon position={{ lat: position.latitude, lng: position.longitude }} className="" iconSize={[38, 95]}> - <svg className="user-location" viewBox="0 0 120 120" version="1.1" - xmlns="http://www.w3.org/2000/svg"> - <text x="20" y="60" style={{fontSize: '48px'}}>TEST</text> + <DivIcon key={position.id.toString()} position={{ lat: position.latitude, lng: position.longitude }} className="" iconSize={[50, 50]}> + <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 50 50"> + <circle cx="25" cy="25" r="20" stroke="#fff" stroke-width="2.5" fill="#008000" /> + <path d="m25 5v5" stroke="#fff" stroke-width="2.5" /> + <image x="13" y="13" fill="#fff" href="/category/car.svg" /> </svg> </DivIcon> ); @@ -29,8 +30,8 @@ class MainMap extends Component { return ( <Map style={{height: this.props.height, width: this.props.width}} center={position} zoom={this.state.zoom}> <TileLayer - attribution='© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/attributions">CARTO</a>' - url="https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png" /> + attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors" + url="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png" /> {markers} </Map> ) diff --git a/modern/src/reducers/index.js b/modern/src/reducers/index.js index 962d83c2..ac592bfe 100644 --- a/modern/src/reducers/index.js +++ b/modern/src/reducers/index.js @@ -9,12 +9,12 @@ function rootReducer(state = initialState, action) { case 'UPDATE_DEVICES': return Object.assign({}, { ...state, - devices: [...state.devices, ...action.devices] + devices: [...action.devices] }); case 'UPDATE_POSITIONS': return Object.assign({}, { ...state, - positions: [...state.positions, ...action.positions] + positions: [...action.positions] }); default: return state; |