MapMarker#

MapMarker

A marker drawn in the map view, with one of the game’s own map icons. Created using POST /drawing/add-map-marker.

Base class: Marker

A MapMarker object is returned as {"id": ..., "class": ...}, its identifier and the name of its own class. An argument is that object or the identifier alone. A path that acts on an object takes the identifier as (id).

GET /drawing/map-marker/(id)/position#

Position of the marker.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (tuple<double, double, double>)

PUT /drawing/map-marker/(id)/position#

Position of the marker.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (tuple<double, double, double>) – The new value.

GET /drawing/map-marker/(id)/reference-frame#

The reference frame that the position or direction of the marker is in.

Inherited from Marker.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (SpaceCenter.ReferenceFrame)

PUT /drawing/map-marker/(id)/reference-frame#

The reference frame that the position or direction of the marker is in.

Inherited from Marker.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (SpaceCenter.ReferenceFrame) – The new value.

GET /drawing/map-marker/(id)/visible#

Whether the object is visible.

Inherited from Drawable.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (bool)

PUT /drawing/map-marker/(id)/visible#

Whether the object is visible.

Inherited from Drawable.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (bool) – The new value.

GET /drawing/map-marker/(id)/icon#

The icon that the marker is drawn with.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (Drawing.MapMarkerIcon)

PUT /drawing/map-marker/(id)/icon#

The icon that the marker is drawn with.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (Drawing.MapMarkerIcon) – The new value.

GET /drawing/map-marker/(id)/image#

The image that the marker is drawn with in place of its icon, or null to draw the icon.

Inherited from Marker.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (Drawing.Image?)

PUT /drawing/map-marker/(id)/image#

The image that the marker is drawn with in place of its icon, or null to draw the icon.

Inherited from Marker.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (Drawing.Image?) – The new value.

GET /drawing/map-marker/(id)/caption#

The caption shown when the mouse is over the marker.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (string)

PUT /drawing/map-marker/(id)/caption#

The caption shown when the mouse is over the marker.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (string) – The new value.

GET /drawing/map-marker/(id)/color#

The color of the object.

Inherited from Drawable.

Note

For a path drawn with more than one color, this is the color at its start.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (StdLib.ColorRGB)

PUT /drawing/map-marker/(id)/color#

The color of the object.

Inherited from Drawable.

Note

For a path drawn with more than one color, this is the color at its start.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (StdLib.ColorRGB) – The new value.

GET /drawing/map-marker/(id)/material#

The material used to render the object. Creates the material from a shader with the given name. Throws an exception if the object is a marker, which the game draws with its own material.

Inherited from Drawable.

Parameters:
  • id – The identifier of the MapMarker object.

Response JSON Object:
  • value (string)

PUT /drawing/map-marker/(id)/material#

The material used to render the object. Creates the material from a shader with the given name. Throws an exception if the object is a marker, which the game draws with its own material.

Inherited from Drawable.

Parameters:
  • id – The identifier of the MapMarker object.

Request JSON Object:
  • value (string) – The new value.

POST /drawing/map-marker/(id)/remove#

Remove the object.

Inherited from Drawable.

Parameters:
  • id – The identifier of the MapMarker object.

MapMarkerIcon

The icon a MapMarker is drawn with, from the game’s own map icons.

Passed and returned as the name of one of its values:

"generic"

A plain marker.

"celestial_body"

A celestial body.

"apoapsis"

An apoapsis.

"periapsis"

A periapsis.

"ascending_node"

An ascending node.

"descending_node"

A descending node.

"maneuver_node"

A maneuver node.

"encounter"

An encounter with a sphere of influence.

"escape"

An escape from a sphere of influence.

"impact"

An impact with the surface.

"close_approach"

A closest approach to a target.

"intersect"

An intersection with the orbit of a target.

"ship"

A ship.

"probe"

A probe.

"relay"

A relay.

"station"

A station.

"base"

A base.

"lander"

A lander.

"rover"

A rover.

"plane"

A plane.

"eva"

A kerbal on EVA.

"flag"

A flag.

"debris"

Debris.

"space_object"

An asteroid or comet.

"deployed_science"

Deployed science equipment.

"launch_site"

A launch site.

"runway"

A runway.

"ksc"

The Kerbal Space Center.