wms

Openlayers 4 - Load WMS image layer require authentication

房东的猫 提交于 2019-12-11 12:49:02
问题 I try to load WMS image layer with openlayers 4.6 and angular 5, the code is: const syr_layer = new ol_layer_Image({ source: new ol_source_ImageWMS({ url: 'serverurl', crossOrigin: 'anonymous', serverType: 'geoserver', params: { 'LAYERS': 'tst:syr'}, projection: 'EPSG:4326' }); }); But it throws an error: GET (myserverurl) 401 (An Authentication object was not found in the SecurityContext) How can I send authentication header with the GET request sent by openlayers? 回答1: For you purpose, you

Leaflet.js: WMS Layer Styles

白昼怎懂夜的黑 提交于 2019-12-11 10:35:35
问题 I have a Leaflet javascript web application which uses WMS to make calls to GeoServer. The returned object is Geometry plus attributes. While the Geometry (polygons) render fine as Counties in the US, I need to make the Counties layer to show different colors, based on County populations. Here is code to load the WMS data: var wmscounty = L.tileLayer.wms("<?php echo $geoserverwms_url; ?>", { layers: '<?php echo $geoserverwms_layer_countypop; ?>', format: 'image/png', transparent: true,

Openlayers3: tile grid incorrect with pixelratio=3 using Geoserver/Geowebcache as backend

China☆狼群 提交于 2019-12-11 08:35:27
问题 I'm developing a small webmap using Openlayers3 and geoserver/geowebcache as backend. My goal is to support browsers/displays with pixelratio=1, pixelratio=2 and pixelratio=3. For that I defined in geoserver backend 3 gridsets with tiles sizes 256x256, 512x512 and 768x768. I assume that: pixelratio=1 requires a gridset with tiles sizes 256x256 pixelratio=2 requires a gridset with tiles sizes 512x512 pixelratio=3 requires a gridset with tiles sizes 768x768 Now, my code is working only for

How to makeIdentify Task in ArcGIS API for android work with a standard WMS

笑着哭i 提交于 2019-12-10 19:19:27
问题 I want to use Identify Task in ARCGIS API for android.I used this example and it works fine but when I try to change the URL to get data from another WMS it shows error here is my another wms I get error in folowing line for (int index = 0; index < results.length; index++) { result_1 = results[index]; String displayFieldName = result_1.getDisplayFieldName(); Map<String, Object> attr = result_1.getAttributes(); for (String key : attr.keySet()) { if (key.equalsIgnoreCase(displayFieldName)) {

WMS as a single tile image in Google Maps v3

◇◆丶佛笑我妖孽 提交于 2019-12-09 23:57:33
问题 I am following the code at http://www.gisdoctor.com/v3/mapserver.html to overlay a WMS as an image on Google Maps using API v3. The js code at the above link is as follows "WMSGetTileUrl" : function(tile, zoom) { var projection = map.getProjection(); var zpow = Math.pow(2, zoom); var ul = new google.maps.Point( tile.x * 256.0 / zpow, (tile.y + 1) * 256.0 / zpow ); var lr = new google.maps.Point( (tile.x + 1) * 256.0 / zpow, tile.y * 256.0 / zpow ); var ulw = projection.fromPointToLatLng(ul);

How to render a portion of spatial data depending on user location on map

夙愿已清 提交于 2019-12-09 23:09:53
问题 we have every street for texas in a database.The issue is, there are 2million streets. When the user looks at a simple county on the map, it takes FOREVER to render the streets for the county because the query has to go through EVERY SINGLE STREET in the texas table. Does anyone have any advice on how we can split the data across tables and have geoserver query the table needed depending on the current users location they are viewing? For Example Instead of one giant texas table how about

Clear WMS layer before redraw on OpenLayers

六眼飞鱼酱① 提交于 2019-12-06 16:46:18
I'm currently successfully displaying multiple layers using OpenLayers (Vector and WMS). My application allow the user to modify some parameters, which will : * modify bound * modify map center * modify the WMS image I use Ajax to avoid page reload, it works nicely, however when some layers take a while to load, the others which are not yet redrawn are still shown in the background (but aren't related at all to my new context). I would like to clear WMS layers (if possible) before re-asking the server for the new image but didn't find anything yet. I do this on the vector layer by calling

Geoserver - GetFeatureInfo of raster/wms layer multiple points/location or bounding box

寵の児 提交于 2019-12-06 10:43:50
问题 I am using Geoserver 2.8.1 version. I have netcdf and grib files, and I am uploading those to Geoserver through Geoserver extensions . After that, I use those data to show layer feature info in the map. (According to zoom scale and image size)I put arrows in the map to reference wind and wave directions. I calculate, to which angle the arrow will be positioned, by getting netcdf info like this; localhost:8080/geoserver/wms?Service=WMS&version=1.3&bbox=23.75,32.75,24.25,33.25&layers=it

How to style transparent overlayed WMS layer

杀马特。学长 韩版系。学妹 提交于 2019-12-06 05:12:17
问题 I successfully overlayed a WMS layer in google maps v3, however, as the information on tiles is black on transparent, it is not well seen on dark background (like satellite map), see some tile for example: (This was the WMS link to retrieve that tile) Question: how to modify the above WMS request to change the foreground color (currently black) to some custom color (e.g. red)? In other words, how to style the layer? The server is apparently able to do it for this layer, since it is possible

WMS as a single tile image in Google Maps v3

我怕爱的太早我们不能终老 提交于 2019-12-04 21:20:49
I am following the code at http://www.gisdoctor.com/v3/mapserver.html to overlay a WMS as an image on Google Maps using API v3. The js code at the above link is as follows "WMSGetTileUrl" : function(tile, zoom) { var projection = map.getProjection(); var zpow = Math.pow(2, zoom); var ul = new google.maps.Point( tile.x * 256.0 / zpow, (tile.y + 1) * 256.0 / zpow ); var lr = new google.maps.Point( (tile.x + 1) * 256.0 / zpow, tile.y * 256.0 / zpow ); var ulw = projection.fromPointToLatLng(ul); var lrw = projection.fromPointToLatLng(lr); var bbox = ulw.lng() + "," + ulw.lat() + "," + lrw.lng() +