Tag Info

New answers tagged

0

With Geoserver you might want to have a try with the CQL filters which are much easier to write than the official OGC style XML/GML filters. I took the "DISJOINT" example from the manual http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html and converted into WFS GetFeature request with INTERSECTS filter. You can test it with the demo ...


1

I've used a javascript/jquery solution to fix the issue with the navigation buttons disappearing when the window has resized. In the section, I have incorporated the following function: <script> $(window).bind('resize', function(e) { this.location.reload(false); }); </script> The code above was modified from the ...


1

This might have to do with some browser security features in Firefox that block access to local files, that aren't present in chrome/IE. It might require using a proxy to make it look like it's from somewhere else, or a workaround to the local restriction. A few links below that might explain a bit better. Blog post from a GIS developer who had a kml ...


0

Does it do this with all feature types or certain features? probins answer notes that in this bug lines work but points/icons aren't being displayed properly. Perhaps this can lead you in the right direction.


0

Usually a request for features is done on a featureservice (WFS) - esp. when you have a more complex logic like querying features within a given polygon. The GetFeatureInfo is designed to perform a feature-query based on the mouse-position in native (meaning display-) coordinates rather the geographic (transformed) coords. But it is indeed restricted to that ...


4

You can only use a x,y (i,j) coordinate search for GetFeatureInfo requests http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getfeatureinfo However, you may test for interactions with polygons (and many other geometries) using a Web Feature Service (WFS) request. E.g. ...


2

(1) Yes. osm2po creates a SQL import file, which already contains the routing topology. (2) Yes. You just need to convert kilometers to miles. If you use km AS cost in your pgRouting query, then your route cost attribute will be in km as well. (3) For the address lookup you need a Geocoder, for example Nominatim. When you know the point coordinates, you ...


1

it depends which Beta Version of OL3 you are using. On the latest Version v.3.0.0 – gamma.2. there is no: new ol.source.SingleImageWMS The source name is: new ol.source.ImageWMS http://ol3js.org/en/master/apidoc/ol.source.ImageWMS.html Try to change that, maybe it solve the problem. Thank you for feedback.


2

This is probably an artifact due to tiling. The layer preview map defaults to a single tile, but I'm guessing your openlayers map uses tiling. Geoserver insists on labeling every tile. GeoServer doesn't know that each request is for a tile in a larger map, so it treats a tile as a complete map and dutifully applies a label to it. So basically, if a road ...


0

I had my question answered in ol-dev mailing list. Setting fallThrough property to true in openlayers map object did the trick. More info here: https://github.com/openlayers/openlayers/blob/master/notes/2.13.md


0

I just tested whether the original Popup example is able to work with a SelectFeature control working on two vector Layers. I took the code behind http://geoext.github.io/geoext2/examples/popup/popup.html and simply duplicated everything with regard to vectorLayer-variable and it all worked. What error are you seeing exactly? A wild guess: are all the ...


0

I think what you need is the general gx_layercontainer, this one does not distinguish between baselayers or overlays. You can see it in action in the official example http://geoext.github.io/geoext2/examples/tree/tree-legend.html


0

Does the official example http://geoext.github.io/geoext2/examples/grid/feature-grid.html help?


2

I usually do this using QGIS. I load the kml layer, save as shapefile and add the columns that are necessary for rendering. Then I open a connection to my postgis database, delete everything inside the current view, and copy-and-paste the kml data into the postgis layer. I have created a separate bboxdb inside postgis for such cases, so my original osm ...


0

data.events.register("loadend", data, function() { console.log(data.features.length); });


0

Make sure you have queryable: true in your layer config.


0

You will need to use the args config property instead so: type: "OpenLayers.Layer.Vector", args: [null, {displayInLayerSwitcher: false}]


1

Your problem is that WFS 1.0.0 does not support reprojection of the coordinates. If you switch your request version to 1.1.0 then GeoServer will take your srs into account.


0

I have encountered your problem previously and I managed to fix it using this method which I hope works for you too. I added my file to ArcMap and, while the overlap is fine, I exported each layer, and in the export dialog I selected Use Same Coordinate System as the Data Frame. I then added the exported layers again to GeoServer.


1

Probably after your requirements get complicated, it is best to think of making a scalable application. The advantage of working with a geometric column is the index, plus you can also work with wkt, GeoJSON and other standards that openlayers postgis and handle very well, so you would simplify the development Here you can find a good tutorial


0

Here is the way I do it. Two Base Layers, base and mq are defined and assigned in a global scope map.events.on({ "zoomend": function (e) { if (this.getZoom() < 9 ) { if (mq.visibility == false ) { mq.setVisibility(true); base.setVisibility(false); ...


1

solved It: function calculateArcPointsGeo(center, radius, startAzimuth, endAzimuth, segments) { var pointList = [], point, i, d = radius / 1000, // d = distance in km R = 6371, // km, R = earth's radius (mean radius = 6,371km) lat1 = deg2Rad(center.Y), lon1 = deg2Rad(center.X), ...


0

Try replacing var text = resolution < 150 ? feature.get('nom_comm') : ''; with var test = (resolution < 150 && resolution > 50 ) ? feature.get('nom_comm') : '';


0

Sorry, solved my own question again. Seems to happen every time I make the decision to post. Anyway, adding this line of code below the draw.deactivate(); solved the problem. farmpaddocks.removeFeatures(e.feature);


3

Just edit the renderd.conf and add a section for your second style (make sure the "URI" entry points to a different path than that of your default style). For example, my renderd.conf contains the sections [default] XML=/etc/mapnik-osm-carto-data/osm.xml URI=/osm/ DESCRIPTION=This is the standard osm mapnik style HOST=host.my CORS=* MINZOOM=0 MAXZOOM=20 ...


0

We had similar problem in one of our projects.We've used open layers 2 modify feature (http://openlayers.org/dev/examples/modify-feature.html) to implement editing topology and it works quite well.You can implement some simple basic checks on the client side (open layer have a good support for working with geometries), but we've decided to do most of them on ...


0

I just found an answer to the first point. Using a request to geoserver. Turns out "overlaps" requires input of a: and b: not "polygon" like the split tool. wpsClient.execute({ server: 'local', process: 'JTS:overlaps', //wps function inputs: { a: mypolygon, //inputs b: mypolygon } How to find required ...


1

I was unable to find anything built-in going through the docs, only this ticket which does not appear to have ever been merged into OpenLayers. You can use the open-source Terraformer library by Esri to convert from Esri JSON to GeoJSON, then use the standard GeoJSON functions in OpenLayers to act on it from there. Alternately, it appears you can glue the ...


0

Try using window.onload=function(){ init(); } instead of body onload=init(), because window.onload waits until all resources has loaded. Onload triggers when the html (without resources) has loaded.


1

I think you need to specify the srs parameter of your layer: srs : '32024' //NAD27 or srs : '32126' //NAD83


7

div.olControlScaleLine{ color: white; } div.olControlScaleLine>div{ border-color: white; }


1

You are getting an error message from the server back in XML. You can view the message by extracting a tile url being sent to the server. This is easy to do in IE - just right-click on the map and copy the image url. Otherwise use Firebug or the debug tools in Chrome to extract the URL. Then just paste it into the browser directly. I'm not sure why you are ...


0

Ok, after deep research I realize I was doing it completely wrong instead of create my own detect intersections function I had to use the following openlayers framework class: OpenLayers.Strategy.Cluster It doing exactly what I wanted to achieve by detecting the intersections, and in much more efficient way, it wont draw vectors who intersect and draw ...


-1

Set your "displayProjection" when creating the map, then simply add the MousePosition control: var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:2154"), units: "m", numZoomLevels: 18, maxResolution: 156543.0339, minResolution: "auto", ...


0

You can store images in postgresql using the following function : create or replace function bytea_import(p_path text, p_result out bytea) language plpgsql as $$ declare l_oid oid; r record; begin p_result := ''; select lo_import(p_path) into l_oid; for r in ( select data from pg_largeobject where loid = ...


4

You can either define vector_term as global variable or pass it as argument in loadKMLTMINT function. To pass as parameter the function definition should be function loadKMLTMINT(terminalcode,vector_term) {


2

We do not use GeoServer Authentication, but we do use an ASP version of that Proxy Script we wrote ourselves with some tweaks. Our script handles the authentication via a Hashtag we included in the WMS Client Calls. The HashTag is set into a database at the Application Level User Login and removed at LogOut or Timeout. It is sent to the client via Ajax ...


0

Previous answer is parcially correct. You have to use a html tag. the easy way to do it, since the content of the featur info window is fetched by geoserver is using a getfeatureInfo template; in the content.ftl you should put someting like : <ul> <#list features as feature> <li><b>Point of interest, ...


1

Computing a Convex Hull is possible in OpenLayers by using the external JSTS library. Although I haven't tried its implementation for convex hull, I have used it to create buffer/union etc. For more please go to this url also here you will find its implementation.


1

When you work strictly with rules, your styles can be serialised to SLD, otherwise not. Working with static styles and context has a slight performance benefit.


0

i dont know the side effects but it fixed, when "olTileImage" override in style.css file that incoming from openLayer.js img.olTileImage { -webkit-transform:inherit; -moz-transform: inherit; -o-transform:inherit ; -ms-transform: inherit; transform:inherit ; -webkit-backface-visibility: inherit; ...


0

Look through these discussion forums. There are some demonstrations in there. http://www.mail-archive.com/openlayers-users@lists.osgeo.org/msg01318.html Example from that link: http://api.geoext.org/1.0/examples/vector-legend.html The example has an attached JS file for you to look through too.



Top 50 recent answers are included