React Map Overview

    The Ignite UI for React map component allows you to display data that contains geographic locations from view models or geo-spatial data loaded from shape files on geographic imagery maps.

    React Map Example

    The following sample demonstrates how display data in IgrGeographicMap using IgrGeographicProportionalSymbolSeries also known as Bubble Series.

    The map component allows you to render geographic imagery from Bing Maps™, and Open Street Maps. The map provides plotting of tens of thousands of data points, and updates them every few milliseconds so that the control can handle your real-time feeds.

    The map's Series property is used to support rendering an unlimited number of geographic series. This property is a collection of geographic series objects and any type of geographic series can be added to it. For example, IgrGeographicSymbolSeries can be added for plotting geographic locations such as cities and the IgrGeographicPolylineSeries for plotting connections (e.g. roads) between these geographic locations.

    The map provides customizable navigation behaviors for navigating map content using mouse, keyboard, or code-behind.

    Dependencies

    The React geographic map component, you need to first install these packages:

    npm install --save igniteui-react-core
    npm install --save igniteui-react-charts
    npm install --save igniteui-react-maps
    

    Component Modules

    The IgrGeographicMap requires the following modules, however the DataChartInteractivityModule is only required for mouse interactions, such as panning and zooming the map content.

    import { IgrGeographicMapModule } from 'igniteui-react-maps';
    import { IgrGeographicMap } from 'igniteui-react-maps';
    import { IgrDataChartInteractivityModule } from 'igniteui-react-charts';
    
    IgrGeographicMapModule.register();
    IgrDataChartInteractivityModule.register();
    

    Usage

    Now that the map module is imported, next step is to create geographic map. The following code demonstrates how to do this and enable zooming in the map.

    <IgrGeographicMap
        width="600px"
        height="600px"
        zoomable="true" />
    

    Additional Resources

    You can find more information about related React map features in these topics:

    API References

    The following is a list of API members mentioned in the above sections: