Skip to content

DelayedPointLayer

Example

Example Source Code
vue
<template>
  <div class="map-container">
    <mb-map :zoom="4" :center="[-96, 37]" background-color="black">
      <mb-delayed-point-layer
        :data="__RESOURCE_URL__ + 'json/americanLibraries.json'"
        :get-position="(d) => d.position"
        :get-fill-color="[49, 92, 114]"
        :get-radius="50"
        :radius-min-pixels="3"
        :get-delay-factor="
          (d) => {
            const result = Math.abs(d.position[0] + 71) / 50
            return result < 0 ? 0 : result > 1 ? 1 : result
          }
        "
      />
    </mb-map>
  </div>
</template>

<script setup lang="ts"></script>

API

PROPS

NameDescriptionTypeDefault
idLayer IDstring-
get-delay-factorFunction to retrieve the delay factor.AnyFunc-
dataSource data for the layer.string / IndexAny / AnyArr / Promise<any>''
showWhether the layer is visible.booleantrue
opacityThe opacity of the layer (0-1).number1
pickableWhether the layer responds to mouse events. If false, the component will not emit mouse-related events.booleanfalse
auto-highlightWhen this property is true and pickable is also true, the hovered object will be highlighted.booleanfalse
highlight-colorThe color to blend with the original color of the highlighted object.string / number[][255, 255, 128, 1]
highlighted-object-indexThe index of the currently highlighted element.number-1
on-data-loadCallback function invoked after data loading is complete.AnyFunc-
data-transformFunction to transform the data before rendering.AnyFunc-
transitionsTransition settings for the layer.IndexAny{}
radius-unitsUnits for the radius: 'meters' or 'pixels'.string ('meters', 'pixels')'meters'
radius-scaleA scaling factor applied to the radius.number1
line-width-unitsUnits for the line width: 'meter'.string'meter'
line-width-scaleA scaling factor applied to the line width.number1
strokedWhether the object has a stroke (outline).booleanfalse
filledWhether the object is filled.booleantrue
radius-min-pixelsMinimum radius in pixels.number0
radius-max-pixelsMaximum radius in pixels.numberNumber.MAX_SAFE_INTEGER
line-width-min-pixelsMinimum line width in pixels.number0
line-width-max-pixelsMaximum line width in pixels.numberNumber.MAX_SAFE_INTEGER
get-positionFunction to retrieve the position. Defaults to accessing the position property of the data object.AnyFunc(d) => d.position
get-radiusFunction to retrieve the radius.number / AnyNumberFunc1
get-fill-colorFunction to retrieve the fill color.number[] / AnyFunc[0, 0, 0, 255]
get-line-colorFunction to retrieve the line color.number[] / AnyFunc[0, 0, 0, 255]
get-line-widthFunction to retrieve the line width.number / AnyNumberFunc1

EVENTS

NameDescriptionParameters

SLOTS

NameDescription

METHODS

NameDescriptionDefinition