New answers tagged

1

The error was in my template variable syntax... And the letter "j" put me on its trail ! In the configuration, url: http://ecn.t2.tiles.virtualearth.net/tiles/a%(quadkey).jpeg?g=1&mkt=en-US is wrong and must be url: http://ecn.t2.tiles.virtualearth.net/tiles/a%(quadkey)s.jpeg?g=1&mkt=en-US Note the "s" character after the closing parenthesis - ...


0

WMS do support the filter (EQUALS, DISJOINT, INTERSECTS, TOUCHES, CROSSES, WITHIN, CONTAINS, OVERLAPS, RELATE, DWITHIN ) and openlayer-3 or 2 can reload the wms images according to filter refer http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html


2

The Adress is wrong, or the server not working... You get the same message when you put it into your browser but you should get the Capabilities document. Also the plain server is not responding if you open the link with the adress http://wms.lizardtech.com/lizardtech/iserv/ows? . There should be an answer there already, what means that something is broken. ...


1

The legend does not depend on the existence of any particular layer. The part that you are missing here is a getColor function. Copying the one from the tutorial in question: function getColor(d) { return d > 1000 ? '#800026' : d > 500 ? '#BD0026' : d > 200 ? '#E31A1C' : d > 100 ? '#FC4E2A' : d ...


0

I don't think what you are trying to do is possible within a standard WMS interface. A WMS doesn't have any concept of a featureid, so you can't apply any filter based on a featureid in a GetMap request. A WMS does have a GetFeatureInfo request but such a request doesn't operate on a featureid, rather it uses a pixel coordinate on the image returned in a ...


0

You can use a custom tileLoadFunction to request images via XMLHttpRequest, instead of just setting the image src. The procedure is described in detail in this Stackoverflow answer: http://stackoverflow.com/questions/32914173/how-to-add-a-http-header-to-openlayers3-requests. Once you get the XMLHttpRequest response (in the onload handler function), you can ...


2

You can see a demo in action to illustrate. The thing to keep in mind are: load Proj4js library and the local EPSG code proj4js declaration from http://epsg.io website get the ol.proj.projection object and set it extent (for managing map resolution) var extent = ol.proj.transformExtent([-8.74, 49.81, 1.84, 60.9], 'EPSG:4326', 'EPSG:27700'); var ...


2

I usually use a function to create WMS Layers to avoid redundances. function Tile(options){ return new ol.layer.Tile({ name: options.name || 'Layer', visible: options.visible === false ? false : true, source: new ol.source.TileWMS({ crossOrigin: 'anonymous', url: options.url, params: { ...


1

Try loading proj4 before OL3. I had issues until I was told to load them in that order.


1

latest versions of ol3 support client reprojection for both raster and vector data. even for tile layers. example here and here I think your fault is that you use the projection config on map and not on view. The rest of our code seems to be correct. Try this var view = new ol.View({ center: birmingham, projection:projection, zoom: 6 ...


0

layers config accepts an ol.Collection or a js array. try this var map = new ol.Map({ layers: [poly1, layers],


1

Yes you can choose to add only one layer to ArcMap - unfortunately it still appears as a child of the Web Map Service but will at least tidy up the list of layers in the Table of Contents. You can do this in two ways: When Adding the Service When connected to the service in GIS Servers, drill down to the individual layer you want and select add. This ...


2

You don't need to reproject a WMS layer, OpenLayers should make the request in the map projection for you automatically. The only time there might be an issue is if the WMS Server doesn't support the projection of your map, but checking the capabilities of your server shows that the layers are available in 3 CRS: <CRS>EPSG:25830</CRS> ...


1

Figured out the issue. The URL was wrong instead of it being http://localhost:8080/geoserver/cite/wms it should have been http://localhost:8080/geoserver/wms


2

It's likely caused by the fact that the canvas renders a cached image instead of requesting a new one. This will cause the cache to be cleared. timer.timeout.connect(layer.triggerRepaint) To get a reference to your layer either create it from python or use the QgsMapLayerRegistry.


0

You can use the Translate tool which allows you to convert input rasters into RGB by setting the Expand option and selecting RGB. You can find the tool from the menu bar: Raster > Conversion > Translate


0

It is possible to extend google maps API functionality to support WMS Tile Layers. All you have to do is compute the bounding box in EPSG:3857 before and add that as parameter to the request extending google's TileLayer capabilities. Here is a nice source for doing that: http://www.azavea.com/blogs/labs/2013/01/wms-on-android/


0

Your code contains: &CQL_FILTER=user_id=1 And I will guess that the two =s are messing up the URL. In Leaflet WMS tilelayers, any extra options which are not defined will be passed to the WMS server as parameters in each request URL, so: var layer = L.tileLayer.wms( 'http://my_wms_adress:8080/geoserver/my_location/wms', { ...


0

You can add conditional statements to freemarker templates. For example in your content.ftl file you can add something like this to only list "YOUR_FIELDNAME". <#if attribute.name == "YOUR_FIELDNAME"> <li>${attribute.name}: ${attribute.value}</li> </#if> Alternatively you can exclude a field by doing this: <#if ...


1

I know this question is really old now, but if anyone get the same problem as he got, maybe this could be helpful ! Your piece of code seems to be good in theory. As I used arcGIS/Leaflet in exactly the same way. But yea, problem could come from missing spatial reference (or maybe incorrect format (image/png or image/jpeg). For the spatial reference, here ...



Top 50 recent answers are included