Skip to main content

Examples

View the page source of each example to see the code.

Filter by  
ContextMenu Control

Demonstrates how to create a custom context menu for use with your maps via right click

Change Map Style

Change the style of the BaseMap after declaration

Cluster

Use a cluster strategy on a set of points and dynamically style those clusters

Cluster By Attribute or Rule

How to cluster features by attribute and/or rule

Custom Button

How to customize and add buttons to the nav panel

Custom Panel

How to customize and add buttons to a custom panel

Drive Time Layer

How to use the DriveTime layer and determine if a location lies within a drive time polygon

EU Toll Detail Report

Demonstrates how to get EU Toll Detail Report in a route

Feature Intersections

Determine which features intersect with one another

Feature Popup

Control when popups are closed

Feature Visibility

Determine feature visibility by attribute

Feature Styling

Set the style of a feature by attribute value

Filtered Dynamic POI Search

Making a POI layer perform dynamic searches based on its viewport, in addition to showing how to filter search results.

Geocoding Results

Using the geocoding results list

Image Markers

Place simple image markers at lat/long coordinates with popups and hover display

KML Layer

Populate vector layer with data from a KML file on remote server

Language Translation

Demonstrates how to set different languages for control panels

Layer Visibility

Toggle Visibility of Map Layers

Marker2

How to use the Marker2 class, and alter its contents

Nearest Feature

Determine the feature that has the shortest distance to the selected feature

Numbered Route Handles

Demonstrates how to dynamically number route stops using the custom SVG feature for route handles.

POI Layer

Demonstrates the use of the POI layer and how to customize the display of the individual POI Markers and Popups.

Point Grid Layer

Display grid of point features

Road Surface Route Layer

Display road surface condition along each route

Road Surface Layer

Display current road surface condition or predict future condition given specific hour offset

Route Handle Images

How to set the image of a route handle

Route Report

Demonstrates how to extract different reports in a route

Route with Popups & Custom Icons

Display a route with custom icons and anchored popups for each of the stops on the route

Routing and Geocoding Controls

Demonstrates the external routing and geocoding controls, and explains how to download and use the necessary files.

Select Features

Use the SelectFeature control to handle the selection of features drawn on the map

Shape Coordinates

This example demonstrates how to draw a shape on the map and then retrieve the vertices of that shape

Show Mouse Coordinates

Add a control to show the current lat/long of the mouse cursor

Single Search

Demonstrates single search function and UI control

Stops with Text Label

Display a route containing stops with custom icons and labeled with the corresponding stop number

Spherical Mercator Projection

Plotting features in a web mercator projection

Traffic Layer

Display live traffic or historical traffic from a specified time and day of the week

TrafficCameras Layer

Demonstrates event handling for traffic camera popups.

Traffic Incidents Layer

Demonstrates event handling for traffic incident popups, customizing feature graphics, and altering popup content.

Truck Routing

Demonstrates use of the various truck routing options and how they affect the route

VectorMarkers and FeatureEvents

How to use the VectorMarker layer and the FeatureEvent control

Vector Formats

Demonstrates how to add features to Vector layer from different format source

Weather Alerts Layer

How to use the WeatherAlerts layer and customize the legend and option controls

Weather Alerts Services

Demonstrates the use of the weather alerts report and service.

Weather Layer

Demonstrates a map containing a weather layer

Zoom To Feature(s)

Zoom in/out to one or all features on a layer

Last updated December 15, 2021.