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.18.3 (2023-10-06)

Bug Fixes

  • cancelable-promise: export CancelError (caea5ff)

Features

  • geocoder: improve NgwProvider (2599feb)
  • ngw-kit: add like and ilike in featureLayerUtils query (ebe7f17)

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 06 Oct 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc