New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jibestream-dev/jmap-mapui-kit

Package Overview
Dependencies
Maintainers
21
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jibestream-dev/jmap-mapui-kit

Kit for the Jibestream SDK to create a Map UI

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
21
Created
Source

MapUiKit

Kit for working with Jibestream Map UI Components

Kind: global class

  • MapUiKit
    • new MapUiKit(control, [options])
    • .renderCompass([options])DOMElement
    • .renderFloorSelector([options])DOMElement
    • .renderZoomButtons([options])DOMElement
    • .renderSearch([options])DOMElement
    • .renderPopup([options])DOMElement

new MapUiKit(control, [options])

Create a Map UI Kit

ParamTypeDefaultDescription
controljmap.JControllerThe currently initialised control
[options]ObjectOptions for how the Map UI Kit should be rendered
[options.padding][ 'Array' ].<Number>[0, 0, 0, 0]Padding for the UI Kit given as pixels from the edge of the container [top, right, bottom, left]
[options.className]String"map-ui-container"The class name for the DOM element that contains all of the UI Kit components

mapUiKit.renderCompass([options]) ⇒ DOMElement

Render or update the compass components

Kind: instance method of MapUiKit
Access: public

ParamTypeDefaultDescription
[options]ObjectHow to render the compass
[options.svgIcon]StringWhat SVG to use for the SVG (given as a data URI)
[options.rotatedSvgIcon]StringWhat SVG to use for when the compass is rotated (given as a data URI)
[options.resetRotationOnTap]BooleantrueWhether the map should reset rotation on tap of the compass
[options.position][ 'Array' ].<Number>[1, 0]Where the compass should be placed, given as [x, y] with x and y being 0 <= x/y <= 1
[options.padding]Object[0, 0, 0, 0]How much padding the compass should have
[options.width]Object
[options.height]Object

mapUiKit.renderFloorSelector([options]) ⇒ DOMElement

Render of update the floor selector

Kind: instance method of MapUiKit
Access: public

ParamTypeDescription
[options]Object
[options.inactiveStyle]jmap.core.StyleHow the inactive state should be styled
[options.inactiveFont]jmap.core.FontHow the inactive state's font should appear
[options.activeStyle]jmap.core.StyleHow the active state should be styled
[options.activeFont]jmap.core.FontHow the active state's font should appear
[options.position][ 'Array' ].<Number>Where the floor selector should be placed, given as [x, y] with x and y being 0 <= x/y <= 1
[options.padding][ 'Array' ].<Number>How much padding the floor selector should have
[options.vertical]BooleanWhether the floor selector should appear vertically or horizontally

mapUiKit.renderZoomButtons([options]) ⇒ DOMElement

Render or update the zoom buttons

Kind: instance method of MapUiKit
Access: public

ParamTypeDescription
[options]Object
[options.inactiveStyle]jmap.core.StyleHow the inactive state should be styled
[options.inactiveFont]jmap.core.FontHow the inactive state's font should appear
[options.activeStyle]jmap.core.StyleHow the active state should be styled
[options.activeFont]jmap.core.FontHow the active state's font should appear
[options.position][ 'Array' ].<Number>Where the zoom buttons should be placed, given as [x, y] with x and y being 0 <= x/y <= 1
[options.zoomInText]StringWhat text the zoom in button should have
[options.zoomOutText]StringWhat text the zoom out button should have
[options.padding][ 'Array' ].<Number>How much padding the zoom buttons should have

mapUiKit.renderSearch([options]) ⇒ DOMElement

Render or update the search bar

Kind: instance method of MapUiKit
Access: public

ParamTypeDescription
[options]Object
[options.inactiveStyle]jmap.core.StyleHow the inactive state should be styled
[options.inactiveFont]jmap.core.FontHow the inactive state's font should appear
[options.activeStyle]jmap.core.StyleHow the active state should be styled
[options.activeFont]jmap.core.FontHow the active state's font should appear
[options.position][ 'Array' ].<Number>Where the search bar should be placed, given as [x, y] with x and y being 0 <= x/y <= 1
[options.placeholder]StringWhat text should appear in the search bar as placeholder
[options.searchArray][ 'Array' ].<Object>What objects to search through/display
[options.maxResults]NumberHow many results should be displayed
[options.onSelect]functionA function that's run on click of a result (with the result as the first parameter passed to the function)
[options.padding][ 'Array' ].<Number>How much padding the search should have

mapUiKit.renderPopup([options]) ⇒ DOMElement

Render a popup

Kind: instance method of MapUiKit
Access: public

ParamTypeDescription
[options]Object
options.coordinates[ 'Array' ].<Number>Where on the map should the popup be placed
[options.map]ObjectOn what map should the popup be placed
[options.titleText]StringThe popup's title text
[options.titleTextStyle]jmap.core.FontHow the title text should be style
[options.subText]StringThe popup's subtitle text
[options.subTextStyle]jmap.core.FontHow the subtitle text should be styled
[options.showActionButton]BooleanWhether the action button should be shown
[options.actionButtonText]StringThe action button's text
[options.actionButtonTextStyle]jmap.core.FontHow the action button's text should be styled
[options.actionButtonInactiveStyle]jmap.core.StyleThe inactive style for the action button
[options.actionButtonStyle]jmap.core.StyleThe active style for the action button
[options.actionButtonCallback]functionA function that's called when the action button is clicked
[options.popupStyle]jmap.core.StyleHow the popup should be styled

Keywords

FAQs

Package last updated on 22 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc