class LayerPolygonRenderer
(Niantic.Lightship.Maps.MapLayers.Components.LayerPolygonRenderer)
Overview
This MapLayerComponent draws polygons on the map
class LayerPolygonRenderer: Niantic.Lightship.Maps.MapLayers.Components.BaseTypes.MapLayerComponent {
public:
// methods
PooledObject<GameObject> DrawPolygon(
IReadOnlyList<LatLng> outline,
string instanceName = null
);
virtual override void Initialize(
LightshipMapView lightshipMapView,
GameObject parent
);
virtual override void OnMapOriginChanged();
};
Inherited Members
public:
// methods
virtual void Initialize(LightshipMapView lightshipMapView, GameObject parent);
virtual abstract void OnMapOriginChanged() = 0;
```cs
protected:
// fields
LightshipMapView LightshipMapView;
GameObject ParentMapLayer;
Detailed Documentation
This MapLayerComponent draws polygons on the map
Methods
DrawPolygon
PooledObject<GameObject> DrawPolygon(
IReadOnlyList<LatLng> outline,
string instanceName = null
)
Draws a polygon defined by a list of LatLng coordinates.
Parameters:
outline
- The points along the polygon's edges, in order
instanceName
- An optional name for the GameObject
Returns:
A GameObject representing this polygon instance
Initialize
virtual override void Initialize(
LightshipMapView lightshipMapView,
GameObject parent
)
Called from the LightshipMapView associated with this component's MapLayer at startup.
OnMapOriginChanged
virtual override void OnMapOriginChanged()
Called from this component's MapLayer when its LightshipMapView has been repositioned to the scene's origin.