);
diff --git a/webapp/src/components/OpenSeaMap/OpenSeaMap.jsx b/webapp/src/components/OpenSeaMap/OpenSeaMap.jsx
index f1f9958..9d5c88e 100644
--- a/webapp/src/components/OpenSeaMap/OpenSeaMap.jsx
+++ b/webapp/src/components/OpenSeaMap/OpenSeaMap.jsx
@@ -4,36 +4,45 @@ import React, { Component } from "react";
import { MapContainer, TileLayer,Marker, Popup } from 'react-leaflet'
import { friend,Hostile, iconShip,createIcon } from "./icon";
import "./OpenSeaMap.scss"
+import { sendMsg } from '../api';
// import icon from 'leaflet/dist/images/marker-icon.png';
class OpenSeaMap extends Component {
+ componentDidMount() {
+ // setInterval(() => this.setState({ time: Date.now()}), 1000)
+ setInterval(() => this.props.parentCallback(), 3000)
+
+
+}
+
+
+ handleClick(e)
+ {
+ // console.log(e.target)
+ console.log("hello world");
+ }
makeIcon(index, entity)
{
var icon;
- // switch (entity.Side)
- // {
- // case "Friend":
- // icon = friend;
- // break;
- // case "Hostile":
- // icon = Hostile;
- // break;
- // default:
-
- // break;
- // }
icon = createIcon(entity.Type,entity.Side)
return (
-
-
+ {
+ console.log(e.target.options.name); // will print 'FooBar' in console
+ },
+ }} >
+
+ {/*
Omu-Aran the Head Post of Igbomina land,
is a town in the Nigerian state of Kwara.
It originated from Ife and currently the local
government headquarters of Irepodun local government.
-
+ */}
);
@@ -45,7 +54,7 @@ class OpenSeaMap extends Component {
// ));
return (
-
+
@@ -54,14 +63,6 @@ class OpenSeaMap extends Component {
{/* {positions} */}
{this.props.Entities.map((pos, index) => (
this.makeIcon(index,pos)
- //
- //
- // Omu-Aran the Head Post of Igbomina land,
- // is a town in the Nigerian state of Kwara.
- // It originated from Ife and currently the local
- // government headquarters of Irepodun local government.
- //
- //
))}