Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alianza-elements

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alianza-elements

Shared UI elements for the alianza-ceibo maps

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.12%
Maintainers
1
Weekly downloads
 
Created
Source

alianza-elements

Shared UI elements for the alianza-ceibo maps

npm install alianza-elements --save

Usage

var elements = require('alianza-elements')

API

style.css

Get some basic global styles for alianza maps.

var css = require('sheetify')
css('alianza-elements/style.css')

backButton([lang], onclick)

A button that returns to the full map view. Will be visible above the stop zoom. lang defaults to es.

var button = elements.backButton(map, {lang: 'es', stop: 11.93}, function () {
  map.fitBounds(...)
})

Updating button language uses the update function

button.language = 'en'
button.update()

Popup(map)

A base popup that uses yo under the hood. update takes an HTML element and updates the dom for the popup.

var popup = elements.Popup(map)
popup.update(HTMLElement)
popup.setLngLat(lngLat)
popup.remove()

Language(updateLang, lang)

  • updateLang: a function that fires when button clicked, with the chosen language as a parameter.
  • lang: the current language (es or en).
var languageControl = elements.language(updateLang, lang)
document.body.appendChild(languageControl)

Keywords

FAQs

Package last updated on 14 Nov 2017

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