leaflet-formbuilder

0.2.9 • Public • Published

# Leaflet.FormBuilder

Helpers to build forms synchronized with Leaflet objects.

Usage

var tilelayerFields = [
    ['options.tilelayer.name', {handler: 'BlurInput', placeholder: 'display name'}],
    ['options.tilelayer.url_template', {handler: 'BlurInput', helpText: 'Supported scheme: http://{s}.domain.com/{z}/{x}/{y}.png', placeholder: 'url'}],
    ['options.tilelayer.maxZoom', {handler: 'BlurIntInput', placeholder: 'max zoom'}],
    ['options.tilelayer.minZoom', {handler: 'BlurIntInput', placeholder: 'min zoom'}],
    ['options.tilelayer.attribution', {handler: 'BlurInput', placeholder: 'attribution'}],
    ['options.tilelayer.tms', {handler: 'CheckBox', helpText: 'TMS format'}]
];
var builder = new L.FormBuilder(myObject, tilelayerFields, {
    callback: myCallback,
    callbackContext: this
});
myContainer.appendChild(builder.build());

See more examples of usage:

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i leaflet-formbuilder

      Weekly Downloads

      107

      Version

      0.2.9

      License

      WTFPL

      Unpacked Size

      14.3 kB

      Total Files

      4

      Last publish

      Collaborators

      • ybon