From e7960a6bf882c3ab8b26eb97c5fdfc30fa31f624 Mon Sep 17 00:00:00 2001 From: muerwre Date: Mon, 27 Aug 2018 18:07:58 +0700 Subject: [PATCH] location button --- src/components/UserLocation.jsx | 5 +- src/modules/Map.js | 2 +- src/sprites/icon.svg | 9 +++ src/sprites/icons_draft.svg | 108 ++++++++++++++++++-------------- src/styles/map.less | 6 ++ 5 files changed, 81 insertions(+), 49 deletions(-) diff --git a/src/components/UserLocation.jsx b/src/components/UserLocation.jsx index 8c56198..e0af0d4 100644 --- a/src/components/UserLocation.jsx +++ b/src/components/UserLocation.jsx @@ -1,6 +1,7 @@ import React from 'react'; import L, { marker } from 'leaflet'; import { DomMarker } from '$utils/DomMarker'; +import { Icon } from '$components/panels/Icon'; export class UserLocation extends React.Component { constructor(props) { @@ -61,7 +62,9 @@ export class UserLocation extends React.Component { render() { return ( -
+
+ +
); } } diff --git a/src/modules/Map.js b/src/modules/Map.js index ce5e935..17406d8 100644 --- a/src/modules/Map.js +++ b/src/modules/Map.js @@ -8,7 +8,7 @@ export class Map { constructor({ container }) { this.map = map(container, { editable: true }).setView([55.0153275, 82.9071235], 13); - this.tileLayer = tileLayer(providers.default, { + this.tileLayer = tileLayer(providers.dgis, { attribution: 'Независимое Велосообщество', maxNativeZoom: 18, maxZoom: 18, diff --git a/src/sprites/icon.svg b/src/sprites/icon.svg index 6d7698e..e1564ae 100644 --- a/src/sprites/icon.svg +++ b/src/sprites/icon.svg @@ -129,6 +129,15 @@ + + + + + + + + + diff --git a/src/sprites/icons_draft.svg b/src/sprites/icons_draft.svg index 81894c0..14f2751 100644 --- a/src/sprites/icons_draft.svg +++ b/src/sprites/icons_draft.svg @@ -26,9 +26,9 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="-2.2387215" - inkscape:cy="4.6847445" + inkscape:zoom="2.8284271" + inkscape:cx="-4.6277031" + inkscape:cy="14.448652" inkscape:document-units="px" inkscape:current-layer="svg8" showgrid="false" @@ -66,49 +66,6 @@ preserveAspectRatio="none" height="85.460419" width="191.82292" /> - - - - - - - - @@ -471,7 +428,8 @@ + + + + + + + + + + + + + + diff --git a/src/styles/map.less b/src/styles/map.less index 869afa4..e849169 100644 --- a/src/styles/map.less +++ b/src/styles/map.less @@ -70,6 +70,12 @@ z-index: 3; box-shadow: @bar_shadow; cursor: pointer; + padding: 1px; + box-sizing: border-box; + + svg { + fill: white; + } } .location-marker {