The JavaScript Maps Library control is ideal for rendering maps from GeoJSON data or other map providers like OpenStreetMap, Google Maps, Bing Maps, etc. Its rich feature set includes markers, labels, bubbles, navigation lines, legends, tooltips, zooming, panning, drill down, and more.
Bind GeoJSON data to the maps to render any geometric shape in SVG (Scalable Vector Graphics) for data visualization of shapes. For example, render the world map or US map and customize it to the desired look using built-in options in the JavaScript Maps control. Add any number of layers to the maps.
GeoJSON data contains geometry objects with properties such as geometry types and coordinates. The geometry types are the values present in the geometry objects of the GeoJSON data that specify the type of shape to be rendered, along with the coordinates that help to draw the shape’s boundary line. Polygon, MultiPolygon, LineString, MultiLineString, Point, MultiPoint, and GeometryCollection are the supported geometry types.
Built-in support for external geospatial imagery services, such as Bing Maps and OpenStreetMap, is used to visualize satellite, aerial, and street maps, or other kinds of imagery tiles without any external shape inputs. Apart from Bing Maps and OpenStreetMap, users can also render maps from various map providers, for example, Google Maps Tile API, TomTom, Mapbox, Esri’s ArcGIS, etc. By using these external services, map data can be located easily.
Using sublayer, a JavaScript Map can be created with multiple geometric layers in a single view. For example, render additional geographic features of a country such as rivers, valleys, and more as sublayer. You can also drill each layer.
Denote a place with symbols or mark messages at the desired latitude and longitude on a map using markers. For example, indicate a particular place on the US map using a balloon marker shape. Also, place any HTML element as a marker and add multiple markers to the map.
Display multiple markers in the same location by clustering the markers overlapping one another. For example, use markers to indicate the top 50 cities in the world. If a marker overlaps another, it will be clustered, and the total number of markers will be displayed over the cluster.
Data labels on the map provide identification for the shapes by displaying their names. Trim or hide the labels at intersections with other labels and when they exceed shape bounds.
Create a simple JavaScript Map with bubbles to represent additional information about shapes such as population density, land area, and more. Bubbles are rendered with various magnitudes and colors based on the underlying data values of the shape.
Denote flight routes or ship routes on a geographic map between two places. These connector lines link points on a map and can also be curved.
Categorize the shapes on a map by customizing their color based on the underlying values. The JavaScript Maps Library control supports three types of color mapping: range color mapping, equal color mapping and desaturation color mapping.
Apply colors to the shapes by comparing their values with a desired numeric range. For example, apply colors to the states in the US based on population density.
Differentiate a shape’s fill based on its underlying values and colors, using equal color mapping. For example, apply colors to the states in the US based on a winning candidate.
Change the opacity of the shapes by comparing their values with a desired numeric range. Minimum and maximum opacity of the shapes can be customized.
Apply multiple colors to the shape from a gradient by comparing their values with a desired numeric range. Any number of colors can be specified for creating the gradient.
Legends provide valuable information for interpreting the map with various colors, shapes, or other identifiers based on data and application needs. Interactive JavaScript Maps Library control supports two types of legends: Default and Interactive.
A map with a legend contains swatches of symbols with descriptions to denote the categories of shapes.
Use a JavaScript Map with an interactive legend to find the range of an underlying shape’s value on mouse hover.
Zoom the JavaScript Map for close-up analysis by pinching the map, scrolling the mouse wheel, clicking the shapes, or by using zooming toolbar; and pan the map for easy navigation across regions. Also change the zoom level of the initial rendering.
The tooltip displays details about the shape value on mouse hover. Tooltips are also displayed for markers and bubbles on a map.
Drill-down the rendered JavaScript Maps to display a different shape data located on another layer. For example, in the initial layer render the world map and on clicking a particular continent, render it separately on another layer.
Select a particular shape on mouse click or highlight on mouse hover to bring the focus to the other shapes on a map.
Create a JavaScript Map with custom shapes by rendering personalized GeoJSON data to indicate building infrastructure, points of interest, flight/bus seat arrangement, cricket stadium, and more.
Display any HTML element as an annotation at a specific point of interest on a map. For example, place a direction compass image on the map using annotation. Also add multiple annotations to a map.
Change the projection of the default rendering map based on the need. The HTML5 JavaScript Maps control supports various types of projections namely, Mercator, Rectangular, Miller, Eckert3, Eckert5, Eckert6, and Winkel3.
State persistence allows the Maps component to maintain state by storing the most recent model value in browser cookies. When the appropriate setting is enabled, some of the Maps component model values are preserved even after the page is refreshed.
Add title and subtitle to visualize additional information on the Maps. Fonts and alignment of the title and subtitle can also be customized.
Customize the look and feel of a JavaScript Map by changing the fill color, background, border, and opacity of shapes. Almost all the elements in the JavaScript Maps are customizable. This control also provides built-in palettes with customizable options, by default.
Export or print the rendered JavaScript Maps to save a local copy for further use.
Export the JavaScript Maps to a PDF document or in image formats such as SVG, PNG, and JPEG in client-side.
Users can localize all the strings used in the Maps user interface as needed. The localization (l10n) library is used to localize UI strings.
The JavaScript Maps library ensures that every element is keyboard accessible. Major features like zooming, panning, shape selection, legend, and drill down can be performed using just keyboard shortcuts, no mouse interaction required. This helps in creating highly accessible applications using this component.
The JavaScript Maps library has complete WAI-ARIA accessibility support. The Maps UI includes high-contrast visual elements that help visually impaired people have the best viewing experience. Also, valid UI descriptions are easily accessible through assistive technologies such as screen readers.
The interactive maps also supports touch interactions.
All the features of JavaScript Maps work on touch devices with zero configuration. Use the touch features such as tooltip, drill-down, selection, highlight, pinch zooming, single tap zoom, and double tap zoom without any customization.
View JavaScript Maps control on various devices. Also hide specific elements in the maps for specific screen sizes by making very minimal changes in the map events.
Render JavaScript Maps Library control in all the modern browsers.
Easily get started with JavaScript Maps Library using a few simple lines of HTML and TS code, as demonstrated below. Also explore our JavaScript Maps Library Example that shows you how to render the Maps in JavaScript.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Essential JS 2</title>
<script src="node_modules/systemjs/dist/system.src.js" type="text/javascript"></script>
<script src="system.config.js" type="text/javascript"></script>
</head>
<body>
<div id="container"></div>
</body>
</html>
import { world_map } from './world_map';
import { Maps } from '@syncfusion/ej2-maps';
let map: Maps = new Maps({
layers: [
{
shapeData: world_map,
dataSource: [
{ Country: 'United States', Membership: 'Permanent', Color: '#feb24c' },
{ Country: 'United Kingdom', Membership: 'Permanent', Color: '#feb24c' },
{ Country: 'Russia', Membership: 'Permanent', Color: '#feb24c' },
{ Country: 'France', Membership: 'Permanent', Color: '#feb24c' },
{ Country: 'China', Membership: 'Permanent', Color: '#feb24c' },
{ Country: 'Albania', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Brazil', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Gabon', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Ghana', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'India', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Ireland', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Kenya', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Mexico', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'Norway', Membership: 'Non-permanent', Color: '#f03b20' },
{ Country: 'United Arab Emirates', Membership: 'Non-permanent', Color: '#f03b20' }],
shapePropertyPath: 'name',
shapeDataPath: 'Country',
shapeSettings: {
fill: '#E5E5E5',
colorValuePath: 'Color',
},
},
],
});
map.appendTo('#container');
Maps component is also available in Blazor, React, Angular, and Vue frameworks. Check out the different Maps platforms from the links below,
The Syncfusion JavaScript Maps component supports the following features:
We do not sell the JavaScript Maps separately. It is only available for purchase as part of the Syncfusion JavaScript suite, which contains over 80 JavaScript components, including the Maps. A single developer license for the Syncfusion Essential Studio for JavaScript suite costs $995.00 USD, including one year of support and updates. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team today to see if you qualify for any additional discounts.
You can find our JavaScript Maps Library demo here.
No, our 80+ JavaScript components, including Maps, are not sold individually, only as a single package. However, we have competitively priced the product so it only costs a little bit more than what some other vendors charge for their Maps alone. We have also found that, in our experience, our customers usually start off using one of our products and then expand to several products quickly, so we felt it was best to offer all 80+ JavaScript components for a flat fee of $995/developer. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team today to see if you qualify for any additional discounts.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.