further readme/info updates
This commit is contained in:
parent
3fa4992113
commit
d20019260e
10
README.md
10
README.md
@ -238,9 +238,11 @@ If you select the **drawing** layer you can also add polylines, polygons and rec
|
|||||||
|
|
||||||
The **worldmap in** node can be used to receive various events from the map. Examples of messages coming FROM the map include:
|
The **worldmap in** node can be used to receive various events from the map. Examples of messages coming FROM the map include:
|
||||||
|
|
||||||
{ "action": "connected" } // useful to trigger delivery or redraw of points
|
{ "action": "connected" } // useful to trigger delivery or redraw of points
|
||||||
{ "action": "click", ... } // when a marker is clicked
|
{ "action": "disconnect", "clients": 1 } // when a client disconnects - reports number remaining
|
||||||
{ "action": "move", ... } // when a marker is moved
|
|
||||||
|
{ "action": "click", "name":"Jason", "layer":"gps", "icon":"male", "iconColor":"blue", "lat":51.024985, "lon":-1.39698 } // when a marker is clicked
|
||||||
|
{ "action": "move", "name":"Jason", "layer":"gps", "icon":"male", "iconColor":"blue", "lat":51.044632, "lon":-1.359901 } // when a marker is moved
|
||||||
|
|
||||||
{ "action": "point", "lat": "50.60634", "lon": "-1.66580", "point": "joe,male,mylayer" }
|
{ "action": "point", "lat": "50.60634", "lon": "-1.66580", "point": "joe,male,mylayer" }
|
||||||
{ "action": "draw", "type": "rectangle", "points": [ { "lat": 50.61243889044519, "lng": -1.5913009643554688 }, { "lat": 50.66665471366635, "lng": -1.5913009643554688 }, { "lat": 50.66665471366635, "lng": -1.4742279052734375 }, { "lat": 50.61243889044519, "lng": -1.4742279052734375 } ] }
|
{ "action": "draw", "type": "rectangle", "points": [ { "lat": 50.61243889044519, "lng": -1.5913009643554688 }, { "lat": 50.66665471366635, "lng": -1.5913009643554688 }, { "lat": 50.66665471366635, "lng": -1.4742279052734375 }, { "lat": 50.61243889044519, "lng": -1.4742279052734375 } ] }
|
||||||
@ -250,6 +252,8 @@ The **worldmap in** node can be used to receive various events from the map. Exa
|
|||||||
{ "action": "addlayer", "name": "myLayer" } // when a new map layer is added
|
{ "action": "addlayer", "name": "myLayer" } // when a new map layer is added
|
||||||
{ "action": "dellayer", "name": "myLayer" } // when a new map layer is deleted
|
{ "action": "dellayer", "name": "myLayer" } // when a new map layer is deleted
|
||||||
|
|
||||||
|
All actions also include a `msg._sessionid` property that indicates which client session they came from. Any msg sent out that include this will ONLY to that session - so you can target map updates to certain sessions only if required.
|
||||||
|
|
||||||
## Controlling the map
|
## Controlling the map
|
||||||
|
|
||||||
You can also control the map via the node, by sending in a msg.payload containing a **command** object. Multiple parameters can be specified in one command.
|
You can also control the map via the node, by sending in a msg.payload containing a **command** object. Multiple parameters can be specified in one command.
|
||||||
|
@ -194,6 +194,7 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
|
|||||||
<p>Receives actions from a worldmap web page.</p>
|
<p>Receives actions from a worldmap web page.</p>
|
||||||
<p>Actions include
|
<p>Actions include
|
||||||
<ul><li><b>connected</b> - when a new client connects
|
<ul><li><b>connected</b> - when a new client connects
|
||||||
|
<li><b>disconnect</b> - when a client disconnects
|
||||||
<li><b>click</b> - when a marker is clicked</li>
|
<li><b>click</b> - when a marker is clicked</li>
|
||||||
<li><b>move</b> - when a marker is dragged/moved</li>
|
<li><b>move</b> - when a marker is dragged/moved</li>
|
||||||
<li><b>point</b> - when a point is added manually using right-click</li>
|
<li><b>point</b> - when a point is added manually using right-click</li>
|
||||||
@ -203,8 +204,11 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
|
|||||||
<li><b>addlayer</b> - when an overlay is added to the map</li>
|
<li><b>addlayer</b> - when an overlay is added to the map</li>
|
||||||
<li><b>dellayer</b> - when an overlay is removed from the map</li>
|
<li><b>dellayer</b> - when an overlay is removed from the map</li>
|
||||||
</ul>
|
</ul>
|
||||||
Use the debug node to see the complete payload of the msg returned. Further information
|
Use the debug node to see the complete payload of the msg returned.</p>
|
||||||
can be found in the <a href="https://github.com/dceejay/RedMap/blob/master/README.md#events-from-the-map" target="_new">Events section</a>
|
<p>All actions also include a <code>msg._sessionid</code> property that indicates which client session the
|
||||||
|
action came from. Any outgoing msg that includes this property will only go back to that session.</p>
|
||||||
|
<p>Further information can be found in the
|
||||||
|
<a href="https://github.com/dceejay/RedMap/blob/master/README.md#events-from-the-map" target="_new">Events section</a>
|
||||||
of the README.</p>
|
of the README.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user