Icons
This commit is contained in:
parent
bfb4856352
commit
e48676da95
3 changed files with 22 additions and 7 deletions
10
src/map.js
10
src/map.js
|
|
@ -5,11 +5,19 @@ import Leaflet from "leaflet";
|
|||
import R from "ramda";
|
||||
import Config from "./config";
|
||||
|
||||
import ActionInfo from 'material-ui/svg-icons/action/info';
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
// convert width/height coordinates to -height/width coordinates
|
||||
const c = (p) => [-p[1], p[0]]
|
||||
|
||||
const Markers = (props) => R.values(R.mapObjIndexed((el,key) => (
|
||||
<Marker position={c(el.position)} key={el.name}>
|
||||
<Marker position={c(el.position)} key={el.name}
|
||||
icon={Leaflet.divIcon(
|
||||
{
|
||||
html: "<i class=\"material-icons\">" + el.icon + "</i>",
|
||||
iconSize: Leaflet.point(32,32)
|
||||
})}>
|
||||
<Popup onOpen={() => props.store.dispatch({type: "uiopen", ui: key})}
|
||||
onClose={() => props.store.dispatch({type: "uiclose"})}>
|
||||
<span>{el.name}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue