Tag Info

New answers tagged

0

The problem was set fids field. When you set fids to ['population.913', 'population.912'], this means a feature that it's fids equal to 'population.913' and 'population9.12'. If you set fids field to 'population.912' or 'population.913' you get correct response


0

Append &outputformat=SHAPE-ZIP to the request, as in this example (replace the ws_world:world_cities with ur workspace and layer) http://hostname.com/geoserver/ws_world/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ws_world:world_cities&maxfeatures=50&outputformat=SHAPE-ZIP


1

Jakub Kania was correct in his comment that the date/time have to be added to the url to make it different from the url of tiles in the cache. You have to subclass OpenLayers.Layer.XYZ for that: OpenLayers.Layer.CustomXYZ = OpenLayers.Class(OpenLayers.Layer.XYZ, { getURL: function () { var url = OpenLayers.Layer.XYZ.prototype.getURL.apply(this, ...


0

Your map file says you are using epsg:4326 as a projection. Leaflet map uses epsg:3857 as a default (https://github.com/Leaflet/Leaflet/blob/master/src/map/Map.js) you could try passing following option when you create your L.Map object var map = new L.Map('map', { crs: L.CRS.EPSG4326 }); Anyway, your problem is around projections


1

Problem solved : 'url' is located in the 'options' field of vectorProtocol $radio.onclick = function() { vectorProtocol.options.url = "/getouterdata"; refreshLayer.refresh({force: true}); });


1

The OpenStreetMap tiles are pre-rendered in Web-Mercator (i.e. EPSG:3857) and hence you can't get them in your projection, and show it in this map. You have two options: Tile your data in Web Mercator Download OSM data, and then create tiles for it your Projection.


1

In server side convert json type to array.


1

Ok, just found the problem : I forgot the parameter "name" in my Vector constructor... My bad


0

You can do this using a Stylemap and a context function. This example shows it in operation http://openlayers.org/dev/examples/styles-context.html Your function would return the value based upon the features layer, eg:- var context = { getColor: function(feature) { var baselayer = feature.map.baseLayer; ... ...


1

For the map div sive you can use the getSize() function that returns a openLayers.Size instance that have width and height properties see: http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getSize map = new.OpenLayers.Map('map'); size = map.getSize() width = size.w height = size.h


0

have you tried to remove them with a for-loop? function onFeatureUnselect(feature) { select_Control.unselectAll(); feature.popup.destroy(); feature.popup = null; for(var i=0;i<map.popups.length;i++) { map.removePopup(map.popups[0]); }


2

when you add a point with new OpenLayers.Control.DrawFeature(wfs, OpenLayers.Handler.Point), by default feature state set to "Insert" but when you add a point with vectorLayer.addFeatures() command, the feature state is null. when OpenLayers wants to save change, it see to the state of the feature, and you have to set the added feature state to ...


0

Not enough reputation so can't add a comment. There can be multiple reasons behind it, Firstly, did you check the server logs? Apache for instance. Might be an issue with the permissions. Also, I am not much aware of TileCache have been using ModTile and Renderd (http://wiki.openstreetmap.org/wiki/Mod_tile) so not aware of the logging of TileCache. Can ...


0

try adding each layer (or a list of layers, it's as you prefer) in the succes fonction of your $.getJSON and call crear() in your document ready. If not, map.addLayers([]) will be called before the response is completed... so it will try to add an empty list function crear( n ){ $.getJSON('json/capas.json', function(data) { ...


0

Finally I am getting popups on my static ip. The issue is we need to set our port in the router. I am using DLink 2730U modem, I have set my Apache Tomcat port in Port Forwarding.


2

I use GeoServer in OpenGeo Suite 4.1. In this package, the "Service access rules list" page has a rule that only "ADMIN" roles have permission for WFS-Transaction. wfs.Transation --> ADMIN You must delete this rule.


1

In your code, you are setting isBaseLayer: false; This will make the layer an overlay layer. If you want it as a base layer, then you just need to set it to true, i.e. isBaseLayer: true


0

I guess you are mixing different things: OSM (and different other map providers, too) deliver maps as so called 'tiles' that are delivered and organized via a so called Tile Map Service standard. You can find the specs for the URL (or folder) structures here. You find different servers that support a TMS rendering. OSM itself uses Mapnik, that supports ...


2

The idea to transfer vector data instead of images and render it on the client side is not new. There are already a lot of tools/projects doing that. See for example this plugin of leaflet, polymap, and also the cartagen project. OpenLayer developer are trying to introduce it in the (long-awaited) version 3.0. Each of these initiatives use their own vector ...


0

Check out the MapStore of Geosoluciones project based on Geoexplorer of OpenGeo. It is open source. I hope and be what you want.


0

An extended question. The method you mention only return xml of already published layers and other published information. Is there any way to return xml information of unpublished/pending layers? I have try wms/wfs/wcs/REST and even python package gsconfig and none of them would do this.


0

OK, I found the solution. I use deactivate and activate on my SelectFeature controls, when I need to set opacity.


1

Since QGIS 2.4, it is in the "Web" submenu. It was a kind of design decision to move the plugins from the plugin submenu to Raster/Vector/Web submenus.


0

Due to the asynchronous nature of JavaScript you can't "delay" code execution to wait for a certain event to happen, you need to use completion callbacks. OpenLayers.Map has a range of events you can listen to, the one you need is zoomend: zoomend triggered after a zoom completes Here's a simple example based on your code: var map = MapPanel.map; ...


0

You need to understrand that the parameters that you pass to the mergeNewParams function, is infact passed to the OGC Service as a HTTP parameter. SO whatever parameter you pass, should be a valid HTTP parameters. I'm assuming that source & target are two string variables that you want to pass. In that case, you can do something like this: var ...


0

I believe you are on the right path. The stumbling block that you are facing is that you can have only one event handler. You need two functions. One function adds your layers as you intend. You need another function to register an event handler for each layer. In OpenLayers there is a setup for one event. That's what you are using. You need to use the ...


0

Rather than using your client-side code to query your database (big security risk), I would suggest you use Geoserver's WFS filtering capabilities. Geoserver's WFS implementation supports a number of filtering techniques, including cross-layer filtering through the querylayer extension. Here is an example implementation. The js in the source is not ...


0

It looks like this is a problem with the tile cache used by the Cupertino, CA service. Looking at the service via the web interface, if you click on the Start tile for any zoom level < 13, you get a 404. Also, if you preview the layer using the ArcGIS JavaScript API, the layer disappears at the smaller scales. You could contact them and let them know ...


0

No, OpenLayers 2.13.1 does not parse 1.1.0 SLD- I get the same error as the OP when using a 1.1.0 SLD file for a GeoJSON layer. Fortunately I found a (sloppy) workaround via some find-and-replace magic in the SLD file: Changed beginning of file (xml prologue is it called??) to match 1.0 standards: <?xml version="1.0" encoding="UTF-8"?> ...


0

I did not have any luck with the accepted answer (although I am working with a GeoJSON layer, not WMS, so perhaps that makes the difference), but I found a sloppy workaround via some find-and-replace magic in the 1.1.0 SLD file: Changed beginning of file (xml prologue is it called??) to match 1.0 standards: <?xml version="1.0" encoding="UTF-8"?> ...


1

I write this html script for you from this formule, x and y are taken from your example. Edit : This code was written for your previous question in which you are looking for a javascript code (This question has been deleted). I'm sorry if I'm off topic and I hope this code will help you anyway. <!DOCTYPE html> <html> <head> ...


0

I just had the same problem and solved it as follows: var mapRestrictedExtent = new OpenLayers.Bounds( layerInfo.initialExtent.xmin, layerInfo.initialExtent.ymin, layerInfo.initialExtent.xmax, layerInfo.initialExtent.ymax ); map = new OpenLayers.Map('map', { //... restrictedExtent: mapRestrictedExtent, //... }); Source (mostly): ...


4

The OpenLayers.Control documentation says: Controls by default are added to the map they are contained within however it is possible to add a control to an external div by passing the div in the options parameter. So you just need to pass the div to the control while initialising it, somewhat like this: var mp=new ...


0

To limit panning, the correct property to set is restrictedExtent, with a Bounds object in the same projection as the map. Unfortunately, I don't think there's a way of panning infinitely left and right if you set this value, since you would have to set left and right values.


0

Note: Read also the comments below the question because they are more valuable than this answer alone. The right way to go is to use the big image as a single internally tiled tiff file and to create overviews with gdaladdo utility. Read slides 10-13 from http://slideshare.net/geosolutions/geoserver-on-steroids and study the first commands from this thread ...


4

If you use custom objects and properties in your GeoJSON, they are ignored when the object is read using GeoJSON format. You can clearly see this on line 115 of the GeoJSON.js source code. Since the properties are never read in the first place, it is not possible to get them in OpenLayers. There are multiple workarounds to get what you want. You could ...


2

It is up to the WMS server admin which formats the server is configured to support for GetFeatureInfo. Check from the GetCapabilities of the WMS server the list of supported INFO_FORMATs. Geoservers by default support geojson and GML info formats and those include also geometries with GetFeatureInfo results. You can try with the following links: ...


0

I also recommend Geoserver/Postgres-Gis which is a good option : totally free and relatively easy. No need GeoNetwork in a first time if you just want to migrate your shapefiles. You will need less than 30 minutes to understand how to manually import your shapefiles (here is a good video tutorial). Once you have your geoserver installed you can easily ...


2

The solution I would recommend is the OpenGeo suite Downloadable from here. There is a free version and various paid support levels. It contains everything you have listed above with the exception of GeoNetwork, also works with QGIS (via a plugin) providing a solid Opensource stack. GeoNetwork could always be setup after the fact to seed from your Geoserver ...


0

You can use a WMS GetFeatureInfo request to query for map feature attributes: Geoserver Tutorial OpenLayers Example


1

I think you simply need to add percent opacity to your layer options: ...{layers: 'municipios'}, {isBaseLayer:false, visibility:false,transparent:true,opacity:0.5} );


1

'transparent' is a WMS parameter (by default it's false), so put it together with 'layers' and try again.


1

It's not a bug in Draw Feature, that's just how 'sketch' works. As you should have noticed, when you drawing line using DrawFeature control, the last point will goes where you move the mouse, and when you finished drawing, it will be removed and the rest of the points forms the result line. That means you must have at least 3 points to finish a line ...


1

There is no ready to use tool available, but I think it's not that difficult to implement you own tool by using any of the three library. For example in OpenLayers, I think you can create a DrawComplexShape control, it can be extend the general DrawFeature Control with draw arc capabilities. The main challenge would be to draw arcs. In terms of that, there ...


0

It was a matter of different Projection systems. Ushahidid stores and returns data in wgs 84(EPSG;4326) system whereas the map was on spherical mercator system (EPSG:900913).



Top 50 recent answers are included