API Docs for: 7.2
Show:

MQA.ShapeLayer Class

Module: MQA

ShapeLayer is the intermediary between the map's Display and the ShapeCollection. It is responsible for managing the shapes in a ShapeCollection as a custom layer on the map.

Properties

_clearCollectionContentsOnRemoval

Boolean private

If set to true a shape collection will be cleared out when TileMap.removeShape is called. For devnet builds this var will be set to false with the mqa.module.devnetmods.js file

Methods

_addPeer

() private

_intCollection

() private

Called at construction with a new collection

_removePeer

() private

addShape

(
  • TODO
)

Add a shape to the collection

Parameters:

  • TODO Shape

    MORE DETAIL

dispose

()

Clean up

eachShapePeer

(
  • cb
)

Helper function that processes through shapes and runs the callback function.

Parameters:

eachShapePeerOrdered

(
  • callback
  • [ascending]
)

Run a callback for each shape peer, with shapes ordered by object ID.

Parameters:

  • callback Function

    The function to run for each shape.

  • [ascending] Boolean default = true

    Whether to process shapes in ascending or descending order.

getDefaultShapeCollection

(
  • map
)
MQA.Collection

Utility function to get the default shape layer

Parameters:

Returns <MQA.Collection>

removeShape

(
  • shape
)

Removes a shape from the collection

Parameters:

  • shape Shape

    to remove from collection

resetTransform

()

All work is done here because each shape needs to be updated to the local coordinate system.