OpenStreetMaps in ASP.NET Core Maps Component

18 Nov 20181 minute to read

The OpenStreetMap (OSM) is the online Maps provider built by a community of developers; it is free to use under an open license. It allows to view geographical data in a collaborative way from anywhere on the earth. The OSM Maps provides small tile images based on our requests and combines those images into a single image to display the Maps area in the Maps component.

Adding OpenStreetMap

OpenStreetMap

Changing the tile server of the OpenStreetMap

The OSM tile server can be changed by setting the tile URL in the UrlTemplate property. For more details about the OSM tile server, refer here.

Enabling zooming and panning

The OSM Maps layer can be zoomed and panned. Zooming helps to get a closer look at a particular area on a Maps for in-depth analysis. Panning helps to move a Maps around to focus the targeted area.

OpenStreetMap with zooming

Adding markers and navigation line

OpenStreetMap with Markers and Navigation Line

Adding sublayer

OpenStreetMap with SubLayer

Enabling legend

OpenStreetMap with Legend