0
votes
1answer
189 views

CartoDB.js - Accessing table fields in hover function

I am new to CartoDB.js and javascript in general, and I am attempting to highlight polygons in response to a mouse hover. My plan of attack attempts to utilize one of the interesting templates ...
1
vote
2answers
113 views

Looking for dissolve algorithm for Javascript

I have three adjacent polygons that together make up a larger shape. I need an algorithm that will dissolve the internal borders leaving only the outside border. An example would be a group of ...
1
vote
1answer
239 views

How to improve speed of rendering polygons from Postgis in Leaflet?

I want to improve speed of rendering polygons in my Leaflet map. Polygons are stored in Postgis, and are rendered with select query with bbox. I wonder can I cache somehow those polygons? I read ...
0
votes
1answer
97 views

Visualizing information when click in polygonā€¸ - Spatial join

I am new to cartodb, right now I am trying to do something similar to the cartodb tutorial: Create your first map with CartoDB.js, but with polygons using my own map. For example: I did a spatial ...
2
votes
1answer
333 views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
2
votes
2answers
1k views

How do I get that polygon from Javascript ArcGIS API?

I would like to have a user draw a Polygon (or Line) onto a web map with the Javascript ArcGIS API drawing tools. For the life of me I can't figure out how to pull that polygon from the client and get ...
3
votes
3answers
957 views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
0
votes
1answer
261 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 ...
0
votes
1answer
570 views

Geojson multipolygon doesn't work with Leaflet bindPopup?

I have polygon and multipolygon data in Geojson format and when I try to bind popup for polygon, it works perfectly, and when I try to bind it for multipolygon, it doesn't work. Is that some Leaflet ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...