Search results

Map Providers

18 Oct 2021 / 1 minute to read

Maps component supports map providers such as OpenStreetMap that can be added to any layers in maps.

Open Street Map

OpenStreetMap(OSM) is a online map provider. The OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from any place on the Earth. One of the most important features in Maps component is the built-in online map provider support. By using this feature, you can render OpenStreetMap in the maps component. This provides the ability to visualize street map tiles without using any external shape files.

tagHelper
osm.cs
Copied to clipboard
@using Syncfusion.EJ2;
   <ejs-maps id="maps">
        <e-maps-layers>
            <e-maps-layer layerType="OSM" urlTemplate="http://a.tile.openstreetmap.org/level/tileX/tileY.png"></e-maps-layer>
        </e-maps-layers>
    </ejs-maps>
Copied to clipboard
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using EJ2_Core_Application.Models;
using Newtonsoft.Json;

namespace EJ2_Core_Application.Controllers
{
    public class HomeController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
    }
}

Bing Maps

Bing Maps is a online map provider for accessing the external geospatial imagery services for deep-zoom satellite view which is supported in the Maps component. This provides the ability to visualize satellite, aerial, and street maps without using any external shape files.

tagHelper
bing.cs
Copied to clipboard
@using Syncfusion.EJ2;
    <ejs-maps id="maps">
        <e-maps-layers>
            <e-maps-layer layerType="Bing" bingMapType="AerialWithLabel" key="// …bingMapKey"></e-maps-layer>
        </e-maps-layers>
    </ejs-maps>
Copied to clipboard
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using EJ2_Core_Application.Models;
using Newtonsoft.Json;

namespace EJ2_Core_Application.Controllers
{
    public class HomeController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
    }
}