C# Class MapAround.Web.MapServerBase

Базова реализация сервера WMxS
Inheritance: IMapServer
ファイルを表示 Open project: gkrsu/maparound.core

Protected Properties

Property Type Description
serverType string
version string

Public Methods

Method Description
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.

Protected Methods

Method Description
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

Private Methods

Method Description
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

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

Method Details

CheckRequestParams() protected abstract method

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
return void

GetCapabilities() protected abstract method

Запрос GetCapabilities
protected abstract GetCapabilities ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
return void

GetFeatureInfo() protected abstract method

Запрос GetFeatureInfo
protected abstract GetFeatureInfo ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
return void

GetImage() protected method

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
return Image

GetImageFromChach() protected method

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

GetJSONFromCache() protected method

Gets a JSON object from a cache
protected GetJSONFromCache ( LayerBase layer, NameValueCollection requestParams ) : string
layer LayerBase
requestParams System.Collections.Specialized.NameValueCollection
return string

GetResponse() public method

Create response
public GetResponse ( NameValueCollection requestParams, Stream responseOutputStream, string &responseContentType ) : void
requestParams System.Collections.Specialized.NameValueCollection
responseOutputStream Stream
responseContentType string
return void

GetVector() protected method

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
return string

GetVectorInfo() protected method

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

MapServerBase() protected method

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

OnBeforeRenderNewImage() protected method

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

OnFeaturesInfoNeeded() protected method

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

OnPrepareRenderFeatureLayer() protected method

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

OnUnknownRequest() protected method

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

ParseBbox() protected static method

Чтение BBOX;
protected static ParseBbox ( string bboxStr ) : BoundingRectangle
bboxStr string
return BoundingRectangle

RequestAction() protected method

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

SetImageToChach() protected method

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

SetJSONToCache() protected method

Sets a JSON object to a cache
protected SetJSONToCache ( LayerBase layer, string jsonObject, NameValueCollection requestParams ) : void
layer LayerBase
jsonObject string
requestParams NameValueCollection
return void

TestCommonParams() protected method

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

TestEnvironment() protected method

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

WmsException() public static method

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
return void

WmtsException() public static method

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
return void

WriteLayer() protected method

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
return void

Property Details

serverType protected_oe property

Тип Сервера.
protected string serverType
return string

version protected_oe property

Версия сервера.
protected string version
return string