Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
value: function render() {
var tripData = this.props.tripData;
if (!tripData || !tripData.geometry) return _react.default.createElement(_reactLeaflet.FeatureGroup, null);
var pts = _polyline.default.decode(tripData.geometry.points);
return _react.default.createElement(_reactLeaflet.FeatureGroup, null, _react.default.createElement(_reactLeaflet.Polyline, {
positions: pts,
weight: 8,
color: "#00bfff",
opacity: 0.6
}));
}
}]);
}),
_react2['default'].createElement(_reactLeaflet.Circle, { center: center, fillColor: 'blue', radius: 200 }),
_react2['default'].createElement(
_reactLeaflet.CircleMarker,
{ center: [51.51, -0.12], color: 'red', radius: 20 },
_react2['default'].createElement(
_reactLeaflet.Popup,
null,
_react2['default'].createElement(
'span',
null,
'Popup in CircleMarker'
)
)
),
_react2['default'].createElement(_reactLeaflet.Polyline, { color: 'lime', positions: polyline }),
_react2['default'].createElement(_reactLeaflet.MultiPolyline, { color: 'lime', polylines: multiPolyline }),
_react2['default'].createElement(_reactLeaflet.Polygon, { color: 'purple', positions: polygon }),
_react2['default'].createElement(_reactLeaflet.MultiPolygon, { color: 'purple', polygons: multiPolygon }),
_react2['default'].createElement(_reactLeaflet.Rectangle, { bounds: rectangle, color: 'black' })
);
}
}]);
Object.values(routeData.patterns).forEach(function (pattern) {
if (!pattern.geometry) return;
var pts = _polyline.default.decode(pattern.geometry.points);
segments.push(_react.default.createElement(_reactLeaflet.Polyline, {
positions: pts,
weight: 4,
color: routeColor,
opacity: 1,
key: pattern.id
}));
});
return segments.length > 0 ? _react.default.createElement(_reactLeaflet.FeatureGroup, null, _react.default.createElement("div", null, segments)) : _react.default.createElement(_reactLeaflet.FeatureGroup, null);