Class XYZTileService
An implementation of ITileService for fetching XYZ tiles
Inheritance
System.Object
XYZTileService
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OSGeo.MapGuide.MaestroAPI.Tile
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class XYZTileService : ITileService, IService
Constructors
| Improve this Doc View SourceXYZTileService(String)
Constructs a new instance
Declaration
public XYZTileService(string urlTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | urlTemplate | The URL of the XYZ tile service/endpoint. The URL must have {x}, {y} and {z} placeholders |
Methods
| Improve this Doc View SourceGetTile(String, String, Int32, Int32, Int32)
Gets the tile at the given XYZ coordinate
Declaration
public Stream GetTile(string mapDefinition, string baseLayerGroup, int column, int row, int scaleIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | mapDefinition | Un-used parameter |
System.String | baseLayerGroup | Un-used parameters |
System.Int32 | column | Y value |
System.Int32 | row | X value |
System.Int32 | scaleIndex | Z value |
Returns
Type | Description |
---|---|
System.IO.Stream |
GetTileAsync(String, String, Int32, Int32, Int32)
Reads a tile from MapGuide
Declaration
public async Task<Stream> GetTileAsync(string mapDefinition, string baseLayerGroup, int column, int row, int scaleIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | mapDefinition | |
System.String | baseLayerGroup | |
System.Int32 | column | |
System.Int32 | row | |
System.Int32 | scaleIndex |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> |
SetUrlTemplate(String)
Sets the URL template for fetching XYZ tiles. The template must have {x}, {y} and {z} placeholder tokens
Declaration
public void SetUrlTemplate(string urlTemplate)
Parameters
Type | Name | Description |
---|---|---|
System.String | urlTemplate |