Socket
Socket
Sign inDemoInstall

@nextgis/control-container

Package Overview
Dependencies
5
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/control-container


Version published
Weekly downloads
47
increased by123.81%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

1.12.0 (2022-03-05)

Bug Fixes

  • mapboxgl-map-adapter: remove image source on layer remove (416a181)
  • ngw-kit: remove duplicates from a query with filter by ANY condition (95ecce5)

Features

  • mapbox-map-adapter: upgrade maplibre to 2.x.x (f322c96)
  • ngw-kit: add ability to render multilayers image adapter (4aa5c6e)
  • ngw-kit: add polygon intersection identify util (7686231)
  • ngw-kit: export getImageAdapterOptions method (2cd5969)
  • react-ngw-map: add getContext hook to module export (d6ff2e1)
  • react: add mapbox and ol packages (1151da6)
  • react: add react map toggle control component (95a9639)
  • webmap: add addLayer onAdded option (212b7b0)

Readme

Source

Control Container

size version

This library allows placing control elements in the corners of the map container.

Libraries such as Leaflet and Mapbox GL JS are already doing this, but Cesium and Openlayers do not have similar functionality.

╭───────────────────────────────────────────╮
│ top-left                        top-right │
│                   MAP                     │
│ bottom-left                  bottom-right │
╰───────────────────────────────────────────╯

Installation

# latest stable
$ npm install --save-dev @nextgis/control-container
# or
$ yarn add @nextgis/control-container

Usage

import ControlContainer from '@nextgis/control-container';

// initialization
const controlContainer = new ControlContainer({ target: 'map-control-id' });
// or
const controlContainer = new ControlContainer({ map: webMap });
controlContainer.addTo('.map-control-class');

// add simple HTML string
controlContainer.append('<div>HTML</div>', 'top-right');
// or HTML element
controlContainer.append(HTMLElement, 'top-right');

// add control
const control = {
    onAdd(webMap) {
        const container = document.createContainer('div');
        webMap.emitter.on('zoomend', () => {
            container.innerHTML = webMap.getZoom();
        });
        return container
    }
}
controlContainer.addControl(control, 'bottom-right');

Commercial support

Need to fix a bug or add a feature to @nextgis/control-container? We provide custom development and support for this software. Contact us to discuss options!

http://nextgis.com

Keywords

FAQs

Last updated on 05 Mar 2022

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc