UNPKG

@syncfusion/ej2-react-maps

Version:

The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options for React

52 lines (51 loc) 2.35 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import * as React from 'react'; import { Maps } from '@syncfusion/ej2-maps'; import { ComponentBase, applyMixins } from '@syncfusion/ej2-react-base'; /** * Represents the React Maps component. * It is ideal for rendering maps from GeoJSON data or other map providers like OpenStreetMap, Google Maps, Bing Maps, etc that has rich feature set that includes markers, labels, bubbles and much more. * ```tsx * <MapsComponent></MapsComponent> * ``` */ var MapsComponent = /** @class */ (function (_super) { __extends(MapsComponent, _super); function MapsComponent(props) { var _this = _super.call(this, props) || this; _this.initRenderCalled = false; _this.checkInjectedModules = true; _this.directivekeys = { 'layers': { 'layer': { 'initialShapeSelections': 'initialShapeSelection', 'markers': 'marker', 'bubbles': { 'bubble': { 'colorMappings': 'colorMapping' } }, 'navigationLines': 'navigationLine' } }, 'annotations': 'annotation' }; _this.statelessTemplateProps = null; _this.templateProps = null; _this.immediateRender = false; _this.isReactMock = true; _this.portals = []; return _this; } MapsComponent.prototype.render = function () { this.isReactMock = false; if (((this.element && !this.initRenderCalled) || this.refreshing) && !this.isReactForeceUpdate) { _super.prototype.render.call(this); this.initRenderCalled = true; } else { return React.createElement('div', this.getDefaultAttributes(), [].concat(this.props.children, this.portals)); } }; return MapsComponent; }(Maps)); export { MapsComponent }; applyMixins(MapsComponent, [ComponentBase, React.Component]);