C# Класс MapAround.Web.MapServerBase

Базова реализация сервера WMxS
Наследование: IMapServer
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
serverType string
version string

Открытые методы

Метод Описание
GetResponse ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void

Create response

WmsException ( WmsExceptionCode code, string Message, Stream responseOutputStream, string &responseContentType ) : void

Writes an error message into specified stream in compliance to WMS standard.

WmtsException ( WmtsExceptionCode code, string Message, Stream responseOutputStream, string &responseContentType ) : void

Writes an error message into specified stream in compliance to WMTS standard.

Защищенные методы

Метод Описание
CheckRequestParams ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType, BoundingRectangle &originalBbox, int &width, int &height ) : void

Checks and tries to parse special request params for WMxS server WMS: BBOX, WIDTH, HEIGHT, SRS WMTS: TILEMATRIXSET, TILEMATRIX, TILEROW, TILECOL, SRS

GetCapabilities ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void

Запрос GetCapabilities

GetFeatureInfo ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void

Запрос GetFeatureInfo

GetImage ( int width, int height, Color backColor, LayerBase useLayers, BoundingRectangle bboxWithGutters ) : Image

Gets image

GetImageFromChach ( LayerBase layer, byte &titleInfo, BoundingRectangle bboxWithGutters ) : Image

Загрузка данных из кэша

GetJSONFromCache ( LayerBase layer, NameValueCollection requestParams ) : string

Gets a JSON object from a cache

GetVector ( int layerNumber, int width, int height, LayerBase useLayers, BoundingRectangle bboxWithGutters, NameValueCollection requestParams ) : string

Returns a vector of objects

GetVectorInfo ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void

Получение информации о карте в формате json.

MapServerBase ( string Version, string ServiceType, BaseServiceDescription description ) : System

Конструктор.

OnBeforeRenderNewImage ( RenderNewImageEventArgs args ) : void

Вызвать событие BeforeRenderNewImage

OnFeaturesInfoNeeded ( WmsFeaturesInfoNeededEventArgs args ) : void

Вызвать событие FeaturesInfoNeeded

OnPrepareRenderFeatureLayer ( PrepareRenderFeatureLayerArgs args ) : void

Вызвать событие PrepareRenderFeatureLayer

OnUnknownRequest ( WmsUnknownRequestEventArgs args ) : void

Вызвать событие UnknownRequest

ParseBbox ( string bboxStr ) : BoundingRectangle

Чтение BBOX;

RequestAction ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : bool

Перенаправляет на обработчик запроса.

SetImageToChach ( LayerBase layer, Image image, byte titleInfo, BoundingRectangle bboxWithGutters ) : void

Сохранения данных в кэш.

SetJSONToCache ( LayerBase layer, string jsonObject, NameValueCollection requestParams ) : void

Sets a JSON object to a cache

TestCommonParams ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : bool

Проверка общих параметров запроса.

TestEnvironment ( Stream responseOutputStream, string &responseContentType ) : bool

Проверка настройки окружения.

WriteLayer ( JObject json, FeatureLayer layer, BoundingRectangle bboxWithGutters, BoundingRectangle mapViewBox, double scaleFactor, NameValueCollection requestParams ) : void

Writes information about layers

Приватные методы

Метод Описание
CopyImage ( Image bmpLayer, Image bmpWithGutters ) : void
CopyImageClipped ( Image bmp, Image bmpWithGutters, int width, int height ) : void

Копирования картинки с обрезанием.

GetImage ( BoundingRectangle bboxWithGutters, string key ) : Image
MapServerBase ( ) : System
SetImage ( BoundingRectangle bboxWithGutters, Image image, string key ) : void
getEncoderInfo ( string mimeType ) : ImageCodecInfo
getTileString ( BoundingRectangle bbox ) : string

Получение текстового описания области видимости.

Описание методов

CheckRequestParams() защищенный абстрактный Метод

Checks and tries to parse special request params for WMxS server WMS: BBOX, WIDTH, HEIGHT, SRS WMTS: TILEMATRIXSET, TILEMATRIX, TILEROW, TILECOL, SRS
protected abstract CheckRequestParams ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType, BoundingRectangle &originalBbox, int &width, int &height ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
originalBbox BoundingRectangle
width int
height int
Результат void

GetCapabilities() защищенный абстрактный Метод

Запрос GetCapabilities
protected abstract GetCapabilities ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
Результат void

GetFeatureInfo() защищенный абстрактный Метод

Запрос GetFeatureInfo
protected abstract GetFeatureInfo ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
Результат void

GetImage() защищенный Метод

Gets image
protected GetImage ( int width, int height, Color backColor, LayerBase useLayers, BoundingRectangle bboxWithGutters ) : Image
width int
height int
backColor Color
useLayers LayerBase
bboxWithGutters BoundingRectangle
Результат Image

GetImageFromChach() защищенный Метод

Загрузка данных из кэша
protected GetImageFromChach ( LayerBase layer, byte &titleInfo, BoundingRectangle bboxWithGutters ) : Image
layer LayerBase
titleInfo byte
bboxWithGutters BoundingRectangle
Результат Image

GetJSONFromCache() защищенный Метод

Gets a JSON object from a cache
protected GetJSONFromCache ( LayerBase layer, NameValueCollection requestParams ) : string
layer LayerBase
requestParams System.Collections.Specialized.NameValueCollection
Результат string

GetResponse() публичный Метод

Create response
public GetResponse ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
Результат void

GetVector() защищенный Метод

Returns a vector of objects
protected GetVector ( int layerNumber, int width, int height, LayerBase useLayers, BoundingRectangle bboxWithGutters, NameValueCollection requestParams ) : string
layerNumber int
width int
height int
useLayers LayerBase
bboxWithGutters BoundingRectangle
requestParams System.Collections.Specialized.NameValueCollection
Результат string

GetVectorInfo() защищенный Метод

Получение информации о карте в формате json.
protected GetVectorInfo ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
Результат void

MapServerBase() защищенный Метод

Конструктор.
protected MapServerBase ( string Version, string ServiceType, BaseServiceDescription description ) : System
Version string Версия.
ServiceType string Тип сервиса.
description MapAround.Web.Wms.BaseServiceDescription Описание сервиса
Результат System

OnBeforeRenderNewImage() защищенный Метод

Вызвать событие BeforeRenderNewImage
protected OnBeforeRenderNewImage ( RenderNewImageEventArgs args ) : void
args MapAround.Web.Wms.RenderNewImageEventArgs
Результат void

OnFeaturesInfoNeeded() защищенный Метод

Вызвать событие FeaturesInfoNeeded
protected OnFeaturesInfoNeeded ( WmsFeaturesInfoNeededEventArgs args ) : void
args MapAround.Web.Wms.WmsFeaturesInfoNeededEventArgs
Результат void

OnPrepareRenderFeatureLayer() защищенный Метод

Вызвать событие PrepareRenderFeatureLayer
protected OnPrepareRenderFeatureLayer ( PrepareRenderFeatureLayerArgs args ) : void
args MapAround.Web.Wms.PrepareRenderFeatureLayerArgs
Результат void

OnUnknownRequest() защищенный Метод

Вызвать событие UnknownRequest
protected OnUnknownRequest ( WmsUnknownRequestEventArgs args ) : void
args MapAround.Web.Wms.WmsUnknownRequestEventArgs
Результат void

ParseBbox() защищенный статический Метод

Чтение BBOX;
protected static ParseBbox ( string bboxStr ) : BoundingRectangle
bboxStr string
Результат BoundingRectangle

RequestAction() защищенный Метод

Перенаправляет на обработчик запроса.
protected RequestAction ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : bool
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
Результат bool

SetImageToChach() защищенный Метод

Сохранения данных в кэш.
protected SetImageToChach ( LayerBase layer, Image image, byte titleInfo, BoundingRectangle bboxWithGutters ) : void
layer LayerBase
image Image
titleInfo byte
bboxWithGutters BoundingRectangle
Результат void

SetJSONToCache() защищенный Метод

Sets a JSON object to a cache
protected SetJSONToCache ( LayerBase layer, string jsonObject, NameValueCollection requestParams ) : void
layer LayerBase
jsonObject string
requestParams NameValueCollection
Результат void

TestCommonParams() защищенный Метод

Проверка общих параметров запроса.
protected TestCommonParams ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : bool
requestParams NameValueCollection
responseOutputStream Stream
responseContentType string
Результат bool

TestEnvironment() защищенный Метод

Проверка настройки окружения.
protected TestEnvironment ( Stream responseOutputStream, string &responseContentType ) : bool
responseOutputStream Stream
responseContentType string
Результат bool

WmsException() публичный статический Метод

Writes an error message into specified stream in compliance to WMS standard.
public static WmsException ( WmsExceptionCode code, string Message, Stream responseOutputStream, string &responseContentType ) : void
code WmsExceptionCode The WMS error code
Message string The error message
responseOutputStream Stream The System.IO.Stream to write the error message
responseContentType string String for mime-type of response
Результат void

WmtsException() публичный статический Метод

Writes an error message into specified stream in compliance to WMTS standard.
public static WmtsException ( WmtsExceptionCode code, string Message, Stream responseOutputStream, string &responseContentType ) : void
code WmtsExceptionCode The WMTS error code
Message string The error message
responseOutputStream Stream The System.IO.Stream to write the error message
responseContentType string String for mime-type of response
Результат void

WriteLayer() защищенный Метод

Writes information about layers
protected WriteLayer ( JObject json, FeatureLayer layer, BoundingRectangle bboxWithGutters, BoundingRectangle mapViewBox, double scaleFactor, NameValueCollection requestParams ) : void
json JObject
layer FeatureLayer
bboxWithGutters BoundingRectangle
mapViewBox BoundingRectangle
scaleFactor double
requestParams NameValueCollection
Результат void

Описание свойств

serverType защищенное свойство

Тип Сервера.
protected string serverType
Результат string

version защищенное свойство

Версия сервера.
protected string version
Результат string