[mapserver-users] Blank tiles
Vogt, Robert (RCIS)
Robert.Vogt at rcis.com
Thu Jul 14 11:51:32 PDT 2016
Hey everyone, I'm using OL3 with mapserver...the problem I'm having is that MapServer seems to be running fine,
I have a .map file say for "States" like this...
MAP
IMAGETYPE PNG24
CONFIG "PROJ_LIB" "C:/Program Files/MapServer/projlib/"
EXTENT -180 -90 180 90
SIZE 256 256
FONTSET "E:/RCIS/Web/MapServerDlls/content/fontset.txt"
IMAGECOLOR 255 255 255
TRANSPARENT ON
PROJECTION
AUTO
END
LAYER
GROUP "Base"
NAME "States"
TYPE POLYGON
STATUS ON
LABELCACHE ON
PROCESSING 'LABEL_NO_CLIP=1'
CONNECTIONTYPE PLUGIN
PLUGIN "msplugin_mssql2008.dll"
CONNECTION "server=stbisqlr3.dvcorp.rcis.com,5208;uid=Mapping01D;pwd=9GreenSnap#4D;Initial Catalog=NATIONALDB;Integrated Security=False"
DATA "shape(geography),ST_NAME_MC from NATIONALDB.sde.STATES USING INDEX STATES_SIDX USING UNIQUE STATES_ID USING SRID=4269"
LABELITEM "ST_NAME_MC"
CLASS
STYLE
OUTLINECOLOR 000 153 000
WIDTH 3
END
LABEL
COLOR 000 153 000
TYPE TRUETYPE
FONT Arial
SIZE 12
ANTIALIAS FALSE
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 2000
MINSCALEDENOM 20.00
END
END
PROJECTION
AUTO
END
END
END
And I build my map like so in OL3...
control.map = new ol.Map({
target: 'map',
renderer: 'canvas',
layers: [],
view: new ol.View({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 12
})
});
Create a vector layer that determines the extent, creates the view, and shows vector objects...which works!!
vectorObjs.promise.then(function () {
//Create empty extent
var extent = ol.extent.createEmpty();
//Loop through vector layers to add them to map and determine extent
var totalExtent = ol.extent;
angular.forEach(webMapValues.vectorFieldLayer, function (Field, key) {
control.map.addLayer(Field);
extent = Field.getSource().getExtent();
totalExtent = ol.extent.extend(extent, totalExtent);
})
control.map.getView().fit(totalExtent, control.map.getSize());
var view = new ol.View({
center: control.map.getView().getCenter(),
zoom: 8,
minZoom: 1,
maxZoom: 19
});
control.map.view = view;
Then I try to add the states layer to the map and everything seems like it's working but I don't see any state tiles?
var States = new ol.layer.Tile({
name: 'States',
extent: totalExtent,
source: new ol.source.TileWMS({
url: 'http://dvfmweb2:80/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingBase.map&',
params: { 'LAYERS': 'States', 'BBOX': totalExtent, 'TILED': true }
})
});
control.map.addLayer(States);
When I execute the call I see several line items in Chrome dev tools indicating state tiles i.e.
http://dvfmweb2/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingState.map&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=States&BBOX=47.318115234375%2C-109.423828125%2C47.3291015625%2C-109.412841796875&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&STYLES
However I just see white?
Any help is greatly appreciated, I've been banging my head on this too long!!
-Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160714/e9def55a/attachment.htm>
More information about the MapServer-users
mailing list