Merge pull request #1412 from fredj/vector-api-hidpi-cleanup

[vector-api] hidpi cleanup
This commit is contained in:
Éric Lemoine
2013-12-20 07:51:10 -08:00
6 changed files with 13 additions and 9 deletions

View File

@@ -543,9 +543,6 @@
* @property {ol.Extent|undefined} extent Extent.
* @property {boolean|undefined} hidpi Use the `ol.Map#devicePixelRatio` value when
* requesting the image from the remote server. Default is `true`.
* @property {ol.source.wms.ServerType|undefined} serverType The type of the remote WMS
* server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
* Default is `undefined`.
* @property {boolean|undefined} useOverlay If `true`, will use
* `GETDYNAMICMAPOVERLAYIMAGE`.
* @property {ol.proj.ProjectionLike} projection Projection.
@@ -607,6 +604,9 @@
* @property {ol.Extent|undefined} extent Extent.
* @property {boolean|undefined} hidpi Use the `ol.Map#devicePixelRatio` value when
* requesting the image from the remote server. Default is `true`.
* @property {ol.source.wms.ServerType|undefined} serverType The type of the remote WMS
* server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
* Default is `undefined`.
* @property {Object.<string,*>} params WMS request parameters. At least a
* `LAYERS` param is required. `STYLES` is `` by default. `VERSION` is
* `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS

View File

@@ -0,0 +1,4 @@
@exportSymbol ol.source.wms.ServerType
@exportProperty ol.source.wms.ServerType.GEOSERVER
@exportProperty ol.source.wms.ServerType.MAPSERVER
@exportProperty ol.source.wms.ServerType.QGIS

View File

@@ -10,8 +10,8 @@ goog.require('goog.uri.utils');
* @enum {string}
*/
ol.source.wms.ServerType = {
MAPSERVER: 'mapserver',
GEOSERVER: 'geoserver',
MAPSERVER: 'mapserver',
QGIS: 'qgis'
};
@@ -63,7 +63,7 @@ ol.source.wms.getDpiParam = function(serverType, pixelRatio) {
if (serverType == ol.source.wms.ServerType.MAPSERVER) {
param['MAP_RESOLUTION'] = 90 * pixelRatio;
} else if (serverType == ol.source.wms.ServerType.GEOSERVER) {
param['FORMAT_OPTION'] = 'dpi:' + 90 * pixelRatio;
param['FORMAT_OPTIONS'] = 'dpi:' + 90 * pixelRatio;
} else if (serverType == ol.source.wms.ServerType.QGIS) {
param['DPI'] = 90 * pixelRatio;
} else {