Initializes an instance of the OSMLayer class.


Namespace: AspMap.Web.Extensions
Assembly: AspMapNET (in AspMapNET.dll)

Syntax

Visual Basic (Declaration)
Public Sub New( _ 
   ByVal serviceUrl As String _ 
)
C#
public OSMLayer(
   string serviceUrl
)
C++
public:
 OSMLayer(
   String serviceUrl
) sealed 
J#
public OSMLayer(
   string serviceUrl
)
JScript
public function OSMLayer(
   serviceUrl : String
)

Parameters

serviceUrl
Specifies the URL to a web service.

Remarks

The serviceUrl parameter must include parameters for tile images in form of {x} {y} {z}, where {x} - tiles by x-axis, {y} - tiles by y-axis, {z} - zoom level.

Example

 Copy Code
OSMLayer osmLayer = new OSMLayer("http://tile.openstreetmap.org/{z}/{x}/{y}.png");
map.BackgroundLayer = osmLayer;

See Also