How to use the react-leaflet.LayerGroup function in react-leaflet

To help you get started, we’ve selected a few react-leaflet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PaulLeCam / react-leaflet / example / build / app.js View on Github external
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
          url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
        }),
        _react2['default'].createElement(
          _reactLeaflet.LayerGroup,
          null,
          _react2['default'].createElement(_reactLeaflet.Circle, { center: center, fillColor: 'blue', radius: 200 }),
          _react2['default'].createElement(_reactLeaflet.Circle, { center: center, fillColor: 'red', radius: 100, stroke: false }),
          _react2['default'].createElement(
            _reactLeaflet.LayerGroup,
            null,
            _react2['default'].createElement(_reactLeaflet.Circle, { center: [51.51, -0.08], color: 'green', fillColor: 'green', radius: 100 })
          )
        ),
        _react2['default'].createElement(
          _reactLeaflet.LayerGroup,
          null,
          _react2['default'].createElement(_reactLeaflet.Rectangle, { bounds: rectangle, color: 'black' })
        )
      );
    }
  }]);
github PaulLeCam / react-leaflet / example / build / app.js View on Github external
var rectangle = [[51.49, -0.08], [51.5, -0.06]];

      return _react2['default'].createElement(
        _reactLeaflet.Map,
        { center: center, zoom: 13 },
        _react2['default'].createElement(_reactLeaflet.TileLayer, {
          attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
          url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
        }),
        _react2['default'].createElement(
          _reactLeaflet.LayerGroup,
          null,
          _react2['default'].createElement(_reactLeaflet.Circle, { center: center, fillColor: 'blue', radius: 200 }),
          _react2['default'].createElement(_reactLeaflet.Circle, { center: center, fillColor: 'red', radius: 100, stroke: false }),
          _react2['default'].createElement(
            _reactLeaflet.LayerGroup,
            null,
            _react2['default'].createElement(_reactLeaflet.Circle, { center: [51.51, -0.08], color: 'green', fillColor: 'green', radius: 100 })
          )
        ),
        _react2['default'].createElement(
          _reactLeaflet.LayerGroup,
          null,
          _react2['default'].createElement(_reactLeaflet.Rectangle, { bounds: rectangle, color: 'black' })
        )
      );
    }
  }]);