0
votes
0answers
48 views

OpenLayers: How to move smaller vectors to front?

I've got a problem that's been bugging me for quite some time now. As you can see in the image below I've got som vectors that ends up beneath bigger ones, and despite all my efforts of trying to ...
0
votes
0answers
34 views

Ignore Transparent Pixels for Bounds Determination

I am displaying an Image using GWT OpenLayers on a map. My Image has transparent pixels and the system which returns my Image returns a footprint that is equal to the image plus the transparent ...
1
vote
1answer
282 views

Get Features from OpenLayers Layer.Vector not working

polygon_layer = new OpenLayers.Layer.Vector("Polygone", { projection : projLonLat, strategies : [ new OpenLayers.Strategy.Fixed() ], protocol : new ...
0
votes
1answer
76 views

Openlayers selection

Is it possible to select a polygon from a predefined Lat & Lon programmatically? eg location point: x='1234' y='5678' intersects polygon '1234', therefore SELECT POLYGON '1234' So far I have ...
0
votes
1answer
89 views

How to send polygon data to wms?

I use OpenLayers and GeoServer. I can read kml file format from OpenLayers. And I want to edit this polygon in kml. So I want polygon data(polygon circle and center coordinate etc..) to GeoServer.
2
votes
3answers
181 views

How to change 0,360 WKT string to -180,180?

I'm reading POLYGON WKT strings using OpenLayers.Format.WKT().read(). The polygons use 0,360 longitudes but my map is -180,180. When I display the polygons on the map they are displayed outside of the ...
0
votes
0answers
54 views

Tiles cover Polygon on zoom and move

i'm using OpenLayers.Geometry.Polygon.createRegularPolygon to generate some nice circles. After i draw them to the Map i'm Moving them and after some while they where hiding by some tiles. The circle ...
1
vote
0answers
151 views

Commit Feature WPS Split process

I develop a WebGIS application with GeoServer (2.1.1) and GeoExt (with the last version of OL). Data (polygons features) are stored in a postgis DB. I've implemented editing tools that allow users to ...
1
vote
3answers
2k views

Openlayers vector feature coordinates are not transforming,

I have a OpenLayers vector with a single feature [0]. It's coordinates are in the map projection (EPSG:3413) and I want them in WGS84 (EPSG:4326) decimal degrees. I have the following code which ...
0
votes
1answer
262 views

OpenLayers generate random polygon

I have a world map. I need randomly to generate polygons and render them on map. I have no problem with rendering, but can anybody suggest how to generate polygons with random geometry? (I need n ...
4
votes
3answers
3k views

Openlayers remove previously drawn polygon on starting to draw next one

Objective: At any point of time there SHOULD only be zero/one polygon(s) on a vector layer with a polygon control. I need the previous polygon to be removed as soon as user starts drawing the first ...
2
votes
1answer
144 views

In OpenLayers, is there any way to convert polygons to tiles?

I have a OpenLayer map which by enabling a feature by user, a very huge table of polygons (lots of small areas, with information and metadata for each) will appear on the map, which rendering this big ...
2
votes
1answer
361 views

How to remove a hole from a polygon in OpenLayers?

Is it possible to remove a hole from a polygon by using OpenLayers? How can I do so?
2
votes
0answers
99 views

Cannot reselect polygon after modify

I've got various vector layers on a OL map. On one layer I have a few draw controls. If I draw a polygon I can select it (the whole pop-up thing works). This also works for all the other features. ...
0
votes
1answer
456 views

OpenLayers polygon fill not working with GeoJSON file as source

I'm trying to visualise some data in a custom shape on a map, and I'm stuck with styling it. I'm currently using the openlayers framework in combination with a geoJSON file that I generate in code. ...
2
votes
2answers
169 views

How can a style be set on a specific polygon using OpenLayers?

Using a polygon id, I want to highlight a polygon, while the mouse is outside of the map area. I can identify the polygon using the following approach: x = 53; for(i=0; ...
3
votes
1answer
2k views

How can GeoJson polygons be colored programmatically using OpenLayers?

I'm experimenting with dynamically setting the color values of a geojson polygon. In my geojson file, there is an attribute for each polygon called pop_den. I am trying to update the fillcolor of the ...
3
votes
1answer
725 views

adding polygon to database in openlayers

I want to add a polygon to the database. I used the following code. The problem is that I am to able to save in database. Whatever polygon I draw on map it gets save temporary and as soon as I reload ...
0
votes
2answers
709 views

How can I convert Polygon to LinearRing Geometry?

How can one convert a Polygon to LinearRing geometry using OpenLayers? I'm thinking that I can do this by getting bounds of the polygon, then use this to construct a Points array. Finally, use ...
3
votes
2answers
1k views

How to change the vertex style for editing?

When I use drag feature, then the circles on the polygon edge has the same style. For example, this OpenLayers site. I need to change it, I mean they need to be a different color. What is their ...
0
votes
2answers
294 views

How to retrieve a single polygon from a multipolygon layer in GeoServer

I have a multipolygon layer in GeoServer. The layer represents states within a country. I want to enable a user to search for a specific state, and then only the selected state to be displayed on the ...
2
votes
1answer
1k views

How to make a predetermined Polygon (Circle) From 4 Coordinates, The Radius and Center Longitude and Latitude in Openlayers

I know how to make a predetermined Polygon in Openlayers (see below). Please have a look at http://studio.netnrg.co.za/dev/rnd/blake.loizides/openlayers var feature2 = new ...
2
votes
1answer
639 views

Openlayers Polygon not visible

I have just recently started playing with mapping but have had limited success. I have been able to create/display markers, but in my current project I am trying to display zipcode areas by creating ...
2
votes
1answer
2k views

How to set polygon opacity on openlayers?

I have some prolems showing polygons in openlayer. I want to divide one city in areas. For the moment I have zona1 and zona2. I took lat and long from google maps so I think they are correct. My ...
1
vote
1answer
504 views

I wanting to reproject the vertices of my polygon. I have been able to achieve this for the bounds but having a bit of trouble with the vertices

I wanting to reproject the vertices of my polygon. I have been able to achieve this for the bounds but having a bit of trouble with the vertices. function onFeatureModified(event) { ...
1
vote
1answer
558 views

Unproject Radius with Openlayers with CRS:84 Projection

I have made a Openlayers integrated map that lets you draw a circle, On completion of the circle I have told the map to give me , Bounds, Center Long and Lats, and lastly the radius. My problem is ...
2
votes
1answer
1k views

how to get Coodinates after Resizing a feature Openlayers

I'm trying to display the coordinates of a Feature or vector layer after I use the modify radio button to resize my vector, but it does not work, nor on my drag feature. I'm using ...
1
vote
1answer
1k views

How to stop or deactivate draw polygon control after the first polygon has been drawn in Openlayers

I want to only be able to draw one circle on my map and then disable the control. Below is my code, Any suggestions? <html xmlns="http://www.w3.org/1999/xhtml"> <head> ...
2
votes
1answer
2k views

How to get the radius of a “circle” in Openlayers

How do you get the radius of a circle in openlayers? I have searched quite a bit and cannot find any resource for this. please help. Here is my code but I want the radius or circumference of the ...
1
vote
2answers
843 views

Openlayers Vector Layer Polygons not displaying properly with OSM

So I have an Openlayers map displaying Acetate tiles in OSM, and I'm drawing polygon regions on a vector layer to represent the countries of the world. This works fine for the most part, however, ...
0
votes
1answer
2k views

How to change events in the Oncomplete Drag function in Openlayers

below is code that works for Openlayers drag function: drag = new OpenLayers.Control.DragFeature(polygonLayer, { autoActivate: true, onComplete: function() {alert('Are you sure this is the ...
5
votes
2answers
2k views

How to disable polygon Label on the vertices (OpenLayers) in Edit Mode

I added the style on the polygon layer like so. var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']); // get a copy of the default style style.label = "1233456 ha" ...
11
votes
3answers
3k views

How to merge two Polygons in OpenLayers?

I have two polygons. polygon1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing1])) polygon2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing2])) ...
0
votes
2answers
9k views

Openlayers How would i get a hover label over my polygon

make a hover/mouseover label for a polygon in Openlayers? I made a map with draw, delete and drag polygon function. Now I need to make a hover mouseover for this. How to get a hover label for ...
0
votes
2answers
4k views

How to delete polygon in Openlayers

I would like to delete my polygon in Openlayers after i have drawn it. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> html, body, #map { ...
2
votes
3answers
2k views

Openlayers get coordinates from polygon

please could someone help me and bless me with an example of how to get coordinates from a polygon in OpenLayers?
1
vote
1answer
3k views

Openlayers get coordinates of a circle vector after draw

I have made a openlayers map. I have made two features on the map. Navigate DRAW POLYGON I have made 40 sides to my polygon which turns out to be a circle. After I have drawn my circle I want to ...
3
votes
2answers
2k views

How to subtract Geometry Point Polygons in OpenLayers?

I have two json arrays, one for background polygon and one for other polygon. And from them, I got two polygon layers. backgroundLayer = new OpenLayers.Layer.Vector("Background Layer", {styleMap: ...
0
votes
3answers
5k views

Understanding the polygon handler function in Openlayers

Using openlayers, I want to be able to draw one polygon on a map. After one polygon is drawn, I want an event to fire that stops any more from being drawn until a button is pressed. My current code ...
7
votes
1answer
1k views

How to select WFS features by polygon in OpenLayers?

I need to be able to select features on a wfs layer using a polygon instead of a box. I was hoping this would be a standard option in the SelectFeature class. Too bad this isn't the case. Any ...
13
votes
6answers
6k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
5
votes
3answers
1k views

How can I display with OpenLayers the geometry returned from a ST_Buffer in POSTGIS?

Im using PostGIS, GeoServer and OpenLayers, and the thing is that i want to display the geometry result from a query like this: SELECT ST_Buffer(ST_GeomFromText('POINT(100 100)'), 500); To perform ...
8
votes
2answers
685 views

Resize polygon along one axis

Using the following example I'm able to resize by scale and origin. polygonFeature.geometry.resize(scale, origin); vectorLayer.redraw(); But does anyone have any suggestions or sample code ...
6
votes
2answers
2k views

Openlayers geometry: how to convert area from degrees to square kilometres?

I get a multypolygon from my web service and want to calculate the area of that polygon. I was trying to use this piece of code: var poly = new OpenLayers.Geometry.MultiPolygon(poligon); var area = ...