Tag Info

New answers tagged

0

In Leaflet 0.7 you can assign a different CRS to each WMS Layer by using its csr option. var myLayer = L.tileLayer.wms(...); myLayer.options.crs = L.CRS.EPSG4326;


0

The construction of your WMS request appears to be missing a ? after the initial url. ms_url="http://localhost:8080/geoserver/TestpostGIS/wms"; .... var URL = ms_url + ...


0

Right click on you layer- click on layer properties- click on display- change the info format to "text plain". if your links look like this: <a href="http://mypage:8081/share/page/search?t=1577313" target="_blank">DOWNLOAD</a> than will work. You can custumize your pop up window if you want. Here is a useful link: ...


0

first you need to create an openlayers filter which can have both spatial or comparison parts (this example has both) filterFormat = new OpenLayers.Format.Filter.v1_1_0(); xmlFormat = new OpenLayers.Format.XML(); var filterType = OpenLayers.Filter.Spatial.INTERSECTS; logicaloperator = OpenLayers.Filter.Comparison.EQUAL_TO; ...


0

Caio if you use ^[\d,]+$ , it will allow certain parameters you dont want such as 1\,\,2\,3. Use instead the following: ^([0-9]+,)*[0-9]+$


0

here a few leads : make sure Geoserver doesn't reproject all the layers everytime a query is made Have a look at the GeoWebCache for more info the docs should help you : superdocs


0

Have you tried refreshing the map : map.updateSize(); Does the trick for me


2

Here is a code sample to show how you could publish a WMS layer hosted on geoserver in Leaflet: var map = L.map('map').setView([51.505, -0.09], 8); var forest2000 = L.tileLayer.wms("http://138.26.24.xxx:8080/geoserver/tiger/wms",{ layers: 'forest2000', format: 'image/png', transparent: true, opacity: 0.7 }).addTo(map); Change ...


0

If GeoServer is served under a different domain to your page then you will need to either enable CORS on the GeoServer application server or enable JSONP requests in GeoServer and update your OL3 app to send JSONP requests. Some of this is covered here under "Cross-domain requests": http://astuntechnology.github.io/osgis-ol3-leaflet/ol3/03-GEOJSON-INFO.html ...


3

This is because boundedBy / bbox is a property that OpenLayers creates when parsing the GML, it is not a real feature property. So when you update, you should clone the feature and get rid of it. Some example code: // do a WFS transaction to update the geometry var properties = feature.getProperties(); // get rid of bbox which is not a real property delete ...


0

You can do line offsets using geometry "offset" function: <LineSymbolizer> <Geometry> <ogc:Function name="offset"> <ogc:PropertyName>geom</ogc:PropertyName> <ogc:Literal>0.00004</ogc:Literal> <ogc:Literal>-0.00004</ogc:Literal> ...


0

@ImaneKtb you can find in ../geoserver/gwc/yourlayersfolder. Just delete one of you "yourlayersfolder". The full path of the geoserver it depend on your type of install (Windows, Linux, Geoserver installer, Boundless installer etc.) It helped to me, but it does'nt mean it will help in your case. The error looks kind of generic error. But anyway, hope it ...


0

I am thinking about the same questions at the moment. We are looking into securing a WFS-T for a government contract. Depending on your setup you may send the request from your client to a custom service using XACML which checks the current user and then either rejects or forwards the AJAX call to Geoserver. There is probably a lot of work involved to get ...


0

sorry, just got it to work. My mistake was, that I missed the workspace in my url of the wms...


0

I agree with Kyle. Even a year later it took me a while to find good examples with explanation which can be easily reproduced. I do like the examples from the 'the book of openlayers 3'. Unfortunately I do not have access to the book itself but I believe it to be well written judging from the examples. This example is for ol 3.4 ...


0

The problem is that the success function is not called with the JSONP call. You need to change the AJAX call accordingly. You need to set jsonp:'format_options' on the AJAX call. The callback is then in the jsonpCallback parameter. $.ajax('http://demo.opengeo.org/geoserver/wfs',{ type: 'GET', data: { service: 'WFS', ...


0

In order to improve readability you can also put the params directly into the AJAX call. With the JSONP call you won't need the format_options or the success parameter. The callback function will be set with jsonpCallback parameter on the AJAX call and the format_options will be set with jsonp:'format_options'. ...


0

Just try changing to: map.on('singleclick', projectName); Reference


1

obviously http://geoserver.com/geoserver/NameSpace/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=NameSpace:LayerName&maxFeatures=50&outputFormat=application/json you get a geojson quite similar to arcgis rest services through the wfs service here is a live example ...


2

There have been similar questions at help.openstreetmap.org with different solutions, see: https://help.openstreetmap.org/questions/7920/mapnik-street-name-generation https://help.openstreetmap.org/questions/21784/render-place-name-in-two-languages-with-mapnik ...


0

Depending on your setup you will want to edit the queries to Postgres to choose the local name if available. See https://help.openstreetmap.org/questions/21784/render-place-name-in-two-languages-with-mapnik for an example. You will need to make sure that the tags are preserved when doing the import(s).


1

The request should be: http://localhost:8080/geoserver/www/test.html Make also sure that your data directory is really \GeoServer 2.7.0\data_dir See for more info: http://docs.geoserver.org/latest/en/user/tutorials/staticfiles.html


1

This behavior I've seen before with point data and have not figured out a workaround for the existing layer. The workaround that I've used in the past is to make a copy of the table in the database, call it something different, and re-create the layer. When you are at the Bounding Box section, make sure to over estimate the bounding box values slightly (or ...


2

For OpenLayers 2 try map.getCenter() http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getCenter Or OpenLayers 3 use map.getView().getCenter() http://openlayers.org/en/v3.5.0/apidoc/ol.Map.html#getView http://openlayers.org/en/v3.5.0/apidoc/ol.View.html#getCenter


0

For OSM and similar maps, the map.projection has to be projection: new OpenLayers.Projection("EPSG:900913"), or EPSG:3857 if you prefer. Just changing the code number to 4326 does not reproject the tiles automatically, but places them into a wrong part of the world. Since Opnelayers can not perform the reprojection on its own, you have to follow the ...


1

Rather than leaping direct to WPS you might find you can get what you need out of the GeoServer SQL View feature. http://boundlessgeo.com/2015/03/support-story-getting-sql-views/ http://docs.geoserver.org/stable/en/user/data/database/sqlview.html It allows you to write some arbitrary SQL and bind some query parameters into it, so the query becomes a ...


0

Thank you all for your help. Actually I'm using OL2 and GeExt, GeoExplorer functions I think the problem is that I defined in the " GeoExplorer.js "a Basemap Layer that is not compatible with my layer. new OpenLayers.Layer.WMS("Global Imagery (OpenGeo) [Online]", "http://maps.opengeo.org/geowebcache/service/wms", { ...


0

Have you taken a look at WMS Decorations? This would allow you to place a dynamically resizing image with a watermark style opacity. You'd still have to figure out some way to force the format_options request parameter to be sent, perhaps a small query rewrite on the server to force adding it onto the end of all requests?


0

I think you're correct, it's not possible to configure in the GUI. If you were using MapServer you could I think do this using the MAXSIZE parameter which inserts MaxWidth and MaxHeight elements in the GetCapabilities response like below: </ContactInformation> <Fees>none</Fees> <AccessConstraints> This service is ...


1

Any valid URI should be working, if it's not, it might be a client issue. I know we do a lot of WFS-T with URIs setup as <company's site>/<projectName> (e.g, http://my.company.com/myproject) from OpenLayers with no issues, but don't have direct experience doing it with QGis.


0

I failed to find a way in geoserver to do this. I had to knock up an additional servlet to run under tomcat that uploads files to the www directory, my slds can then use http://localhost/geoserver/www/symbols/airport.svg as the URL. Happy to accept a better answer though.


0

You cannot have WFS for Grouped Layers. Grouped Layers are an Geoserver specific service, which works as a Single WMS service containing multiple Layers. This is outside the scope of OGC standards, and it only returns images. Having a vector group layer for multiple layers does not make sense. You should be able to access the individual layers as WFS.


0

Some fairly obvious things to check: 1) try replacing "localhost" with your IP address, especially if you are running your webmap off of another machine (e.g. Geoserver on guest, webmap on host); 2) verify read/write permissions for the folder containing the dataset; 3) Check the code of the openlayers preview and compare to your code. Likewise, note ...


0

try to copy here your rasters: /var/lib/opengeo/geoserver/workspaces/opengeo/data or give 755 permission to your mydata folder and restart the geoserver, but my guess is your data folder should be a subfolder of the geoserver workspaces folder.


1

Openlayers is just a JavaScript library, so you can use whichever Integrated Development Environment (IDE) you feel most comfortable using for web development. If you are using a Java web framework then NetBeans IDE would be an ideal choice as its primarily for developing in Java. Its also worth checking out the JetBrains IDE's. Edited to answer your ...


0

This is modification of burg.sld that comes along with geoserver. I have provided earthquake.png in styles directory of GEOSERVER_DATA_DIRECTORY. <?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" ...


0

Here is the simple version var aVectorLayer = new OpenLayers.Layer.Vector('someLayer', someOptions); //apply the stylemap with ajax request OpenLayers.Request.GET({ url: "some_sld_url", success: function(req) { var format = new OpenLayers.Format.SLD(); var sld = format.read(req.responseXML || ...


1

I would suggest another approach. If you do not need vector data only OSM as a base map which looks the same as http://www.openstreetmap.org maybe you could create your own OSM service using Mapproxy. I know it is not perfect, but maybe you could give it a try. First you need to install Mapproxy. Pre-seed all zoom levels of OSM for particular area and then ...


1

It depends on the javascript client you are using (e.g. Leaflet, OpenLayers, Google Maps API, ESRI javascript API, etc.), and what you are trying to publish (WFS, WMS, etc.). For OpenLayers, you can preview the layer through the admin UI and get a good idea of how it works (view the page source after the preview loads): ...


0

The problem, apparently, was with my browser. I tried with a clean browser and it has no problem. Go figure what it is (I have Ghostscript, but it is indicating zero spies on geoserver, and NoScript, but it is indicating nothing blocked on geoserver).


5

If you want to use a postgis database with Openstreetmap data, you have to populate it with osm2pgsql, not osmosis. That is the only way to get polygons out of Openstreetmap multipolygon relations and closed ways in a format that GIS software can understand. Alternatively, you can use GDAL ogr2ogr to save OSM data into a spatialite database. Once you have ...


0

use QGIS Open the map file by ََQGIS Select the items map by type style the items one by one see the tutorial here


1

Figured it out! The following SLD uses a rendering transformation to call "gs:Clip", which clips vector features to a bounding geometry. The result is then rasterized by GeoServer's WMS. <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.0.0" xmlns:ogc="http://www.opengis.net/ows" ...


1

The following program ArcMap2SLDConverter will generate an SLD file from an ArcGIS Map - but you must have ArcGIS installed and running to do so. This SLD can then be uploaded to GeoServer, and used to style the corresponding layer.



Top 50 recent answers are included