Global

Methods

iconagent(lat_lng, icon, agentmap)

Returns a IconAgent object.
Parameters:
Name Type Description
lat_lng LatLng A pair of coordinates to place the iconagent at.
icon Object A Leaflet Icon to depict the agent with.
agentmap Agentmap The agentmap instance in which the iconagent exists.
Source:

Type Definitions

iconAgentFeatureMaker(id) → {Point}

A user-defined callback function that returns a feature with appropriate geometry and properties to represent a iconagent.
Parameters:
Name Type Description
id number The agent's Leaflet layer ID.
Source:
Returns:
- A GeoJSON Point object with geometry and other properties for the iconagent, including a "place" property that will set the iconagent's initial Place, and an "icon" property that determines the icon which will depict the iconagent. All other provided properties will be transferred to the IconAgent object once it is created. See https://leafletjs.com/reference-1.3.2.html#marker and https://leafletjs.com/reference-1.3.2.html#marker for all possible Icon and Marker options.
Type
Point
Example
let icon_A = L.icon({			
	"iconUrl": "pic.jpg",			
	"iconSize": [38, 95],
	"iconAnchor": [22, 94]
}),
point = {					
	"type": "Feature",				 
	"properties": {					
		"icon": icon_A,
		"place": {				
			"type": "unit",			
			"id": 89			
		},								
		age: 72,				
		home_city: "LA"				
	},						
	"geometry" {					
		"type": "Point",			
		"coordinates": [			
			14.54589,			
			57.136239			
		]					
	}						
}