Browse Source

fix map build

pull/39/head
Sacha Weatherstone 4 years ago
parent
commit
d72a859f39
  1. 13
      src/pages/Map/index.tsx

13
src/pages/Map/index.tsx

@ -57,16 +57,15 @@ export const MapPage = (): JSX.Element => {
marginLeft="auto" marginLeft="auto"
size="small" size="small"
onClick={() => { onClick={() => {
console.log("clicked"); if (n.data.position?.latitudeI) {
console.log(map);
map?.flyTo({ map?.flyTo({
center: [ center: [
n.data.position?.latitudeI / 1e7, n.data.position.longitudeI / 1e7,
n.data.position?.longitudeI / 1e7, n.data.position.latitudeI / 1e7,
], ],
zoom: 10, zoom: 10,
}); });
}
}} }}
/> />
</Pane> </Pane>
@ -90,9 +89,7 @@ export const MapPage = (): JSX.Element => {
</Pane> </Pane>
</Marker> </Marker>
))} ))}
{nodes {nodes.map((n) => {
.filter((n) => n.data.position?.latitudeI)
.map((n) => {
if (n.data.position?.latitudeI) { if (n.data.position?.latitudeI) {
return ( return (
<Marker <Marker

Loading…
Cancel
Save