JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

learn more… | top users | synonyms (1)

0
votes
1answer
56 views

Plotting shapefile on map using ArcGIS API for JavaScript?

We are using dojo framework to develop our portal.We have bind the arcgis map in our web portal.Is there any arcgis JavaScript API which will accept the path of the shape file and plot that shape ...
-1
votes
1answer
26 views

ARCGIS Javascript query throwing error

Below are two screen shots, one for when I am querying on arcgis server and the other when I am querying the same server through javascript. For some reason, javascript querying is throwing error for ...
0
votes
1answer
47 views

Plotting GeoJSON data on map using ArcGIS API for JavaScript?

We are developing the portal in which we are using Arcgis javascript APIs.The requirement in our project is one of the weather provider is going to publish the webservice which will return the weather ...
1
vote
1answer
131 views

Change The OpenLayers 3 script into openlayers 2.13

Hi all I want to change the code from pgrouting latest workshop which is used the Openlayers 3 beta to Openlayers 2.13 The code is in here http://workshop.pgrouting.org/chapters/ol3_client.html I ...
0
votes
1answer
48 views

How to highlight polygons around my geolocation?

I'm using the ArcGIS JavaScript API to create a map. I need to select/highlight polygons on my feature layers around my geolocation. I use in-build "LocateButton" function for geolocation. I looked ...
1
vote
1answer
60 views

Adding MapServer layer in Openlayers 3

As per i know that there is an API called Openlayers.MapServer in openlayers 2, which is used to show MapServer file in browser in openlayers. How can i add an MapServer file in Openlayers 3, as i ...
0
votes
2answers
46 views

featureClick won't work in cartoDB

EDIT: Link to repo containing the files. Open the index.html file in the imports and exports folders. I can get everything except featurecClick to work. My JS: window.onload = function(){ var ...
0
votes
1answer
39 views

OpenLayers3 get feature request for more than one point in the same place

I created a map that brings up a popup overlay on click, the JSFiddle is here. The only issue I have now is if I have two points in the same location it. As you can see with the Birmingham point, ...
0
votes
1answer
131 views

Infowindow split string by comma

I might have went about this the wrong way, though I thought it may be a good idea to ask before starting over again. I have a picture column in cartodb which has multiple picture ids separated by ...
4
votes
1answer
193 views

Handling Popups in Leaflet with Overlapping Features

I am new to Leaflet as well as Javascript, and I'm looking for some advice on a basic topic. Currently, I am trying to create a spatial index of library holdings for old topographic maps that people ...
1
vote
0answers
48 views

Opengeo suite 4.6, gxp template, problem in adding print tool

I have checked this question here but it one of the link is missing and it was on suite 3.0 and i have no idea if it will work on suite 4.6.I have installed the print extension in opengeosuite then ...
0
votes
1answer
39 views

Combining Get Feature requests within OpenLayers3 Overlay

I have a map which currently shows one feature of a layer in an overlay popup when you click on it, as per this JSFiddle. As you can see, it currently displays the address within the overlay. I am ...
0
votes
0answers
28 views

StopPropagation not working in openlayers 3

I've tried the evt.StopPropagation() and evt.preventDefault() and return false; none of them works, is there any solution to stop event propagation of draw interaction in Openlayers 3.
0
votes
1answer
28 views

Merging OpenLayers3 overlay with a get feature on click command that closes

I have this JSFiddle that is working fine on its own to select cities in the UK. I have then taken this OpenLayers3 example and put it into a JSFiddle. I am looking to combine the two so I have a ...
0
votes
2answers
76 views

Mapbox Geocoding and Markers

I recently added Mapbox's Geocoder Control and it works wonderfully. I was wondering if anyone could tell me how I could have a marker appear at the location of the address that was searched for? ...
4
votes
2answers
213 views

How would I get number of tiles loaded, and total number loading?

So new to OpenLayers 3, and I'm trying to create a "loading bar" to indicate how much of a layer has loaded. I'm thinking of making it based on the number of tiles loaded so far divided by the total ...
1
vote
1answer
60 views

Selection with OL 3.5.0 doesn't work correctly

I try a selection of object with OpenLayers 3.5.0 but she doesn't work correctly. I make a code like this when I click on the map : var map; var selection; function init () { /* SCU */ ...
1
vote
1answer
62 views

Using forEachFeatureAtPixel without mouse

I've an HTML with a list of data's : <select id="searchinput" align="top" maxlength="120" name="zl_choix">(...) And the button search with this code: <input type='button' value='Search !' ...
1
vote
1answer
791 views

Line dash not working OL3 (Openlayers 3)

I want to display a dashed line in a vector layer, as the it's shown in the Documentation there is a propriety called lineDash , but it didn't work for me here my code : var iconStyle_line = new ...
6
votes
1answer
152 views

Mousewheel event being locked by map

I've got a tabbed UI on my web page, the last tab is an arcgis javascript map built with their API. The problem I'm having is that just adding the map and all of the esri / dojo libraries to the page ...
3
votes
2answers
68 views

Make a list of layers

I'm working with the javascript library OpenLayers 3.0. I try to have the listing of the layers of my map. If I do console.log(map.getLayers()); I've got the array [a] my four layers : But I ...
2
votes
1answer
134 views

How to project a GeoJSON on the fly in OpenLayers 3?

I have been trying to load a GeoJSON without success. I have a map with a background layer from OSM. I have some data in 4326 I want to overlay on that map. I do not want to transform coordinates one ...
2
votes
1answer
291 views

How to center the map to a KML placemark with OpenLayers 3?

I'm using OpenLayers 3 to display my KML layer on the map. My KML contains two placemarks, one contains a linestring of waypoints and the second one is a point, like this: <kml ...
1
vote
0answers
37 views

assign sld to Openlayers 3 TileWMS [closed]

Based on this: Apply an SLD saved on Geoserver to OpenLayers 3 I try to set a SLD in the params of a TileWMS. The SLD is saved on Geoserver, but everything i tried failed. The strange thing about it ...
1
vote
1answer
12 views

Navigate in layer parameters

I've a layer who contain many parameters like number. I try to "navigate" in this layer for make a specific action. The schematic structure of my layer look like : object : [a] - item (1) - [o] - ...
7
votes
2answers
1k views

Can't get WFS working in Openlayers 3

I try to get my WFS working but with no success. Actually I use nearly the same Code like in the OL3-Examples. In Firebug I can see a lot of WFS-Requests and a GML-Response which looks fine to me. ...
6
votes
4answers
4k views

How can I use WFS from Geoserver with OpenLayers 3?

I have tried with different setups and formats, but no success. With firebug, I can see that the json data is loaded, but nothing shows up on the map. Have anyone experience with geoserver and wfs ...
2
votes
1answer
113 views

OpenLayers 3.5.0, clear highlighted feature after removing feature from source

I want the user to be able to delete the highlighted feature. This works well, but the feature is not cleared until I move the pointer outside the feature geometry. I am using the OL 3.5.0 library. ...
1
vote
2answers
77 views

Changing longitude,latitude to latitude,longitude in OpenLayers 3?

Openlayers is representing the coordenates as longitude,latitude. Can I change the default format longitude,latitude to latitude,longitude? By example, this will not work, because I have this array ...
2
votes
1answer
149 views

OpenLayers 3.5 WFS-T update to GeoServer 2.7 raises StringIndexOutOfBoundsException

I am using ol.format.WFS.writeTransaction() (OL3.5) to generate WFS-T statements. This works well for insert and delete. The problem is with the update statement. Any update statement returns ...
1
vote
1answer
182 views

Get WFS layer from GeoServer to OpenLayers 3

I am creating a web map application for a website. I am using GeoServer 2.6.2 and OpenLayers 3.2. I have not problems with WMS layers, but I am not be able to visualize vector layers. This is the ...
1
vote
1answer
97 views

How can I clear a vector layer before drawstart in openlayers 3?

I have a vector layer in OL3 which I want to auto clear when drawing a Point feature (which means there is always max 1 feature in the layer). Problem is that when I listen to drawstart ...
4
votes
1answer
108 views

How can I select a feature in Openlayers 3 by right click it?

I'm trying to selete / delete a feature by right click it on Openlayers 3. I know I have map events singleclick/click/dblclick and I also know I can use the ol.interaction.Select for delete. In ...
0
votes
1answer
47 views

Trying to add a WMS layer to Openlayers 3 but not showing anything

I have started with Openlayers 3 recently and I need to add a layer from an own WMS. I have been trying this: map = new ol.Map({ target:'map', renderer:'canvas', layers: layer, view: ...
1
vote
2answers
526 views

OpenLayers3: How to reload a layer from GeoServer when underlying data change?

I have a webpage that displays a GeoTIFF served via GeoServer as an OpenLayers3 ImageWMS layer. What I need is to (via a button) reload the OL3 layer after the underlying GeoTIFF changes. I searched ...
1
vote
2answers
44 views

OpenLayers3: How to draw line with beetwen two points

I've following code: var source = new ol.source.Vector(); var vector = new ol.layer.Vector({ source: source style: new ol.style.Style({ stroke: new ol.style.Stroke({ color: "#ffcc33", ...
1
vote
1answer
65 views

Popup filter with OpenLayers3

When I load my map, I load my vector overlay with this code : var vector_overlay1 = new ol.layer.Vector({ source: new ol.source.GeoJSON({ url: 'json.json', defaultProjection ...
3
votes
1answer
58 views

Dashed lines in OL3?

I know this question has been asked earlier here . But the solution proposed is not working. I was unable to comment on that due to reputation points so had to post this question. My code is : var ...
1
vote
2answers
188 views

Load a file geojson in OpenLayers 3

Before, to load my .geojson, I had a php file who generated the code : var vector_limite_comm_white = new ol.layer.Vector({ source: new ol.source.GeoJSON({ url: 'geojson1.php', ...
1
vote
0answers
37 views

Wrapping WTMS image & map extent

I'm using OpenLayers 3 (both v3.4 and v3.5) to display a tiled image from a NASA WMTS server and have a question about using the layer wrapX parameter on a global map. When I set wrapX=true in the ...
2
votes
2answers
52 views

OpenLayers 3: get the osm_id of the closesd point

Is there a way to get osm_id of the point that is closest to a given coordinate. The idea is to click on map and get the osm_id map.on('click', function(event) { ...
1
vote
1answer
19 views

Openlayers 3 containsExtent

According to the API: ol.extent.containsExtent(extent1, extent2) checks to see whether extent1 is contained by extent2. With the following variables: extent1 = [-93, 44, -94, 45]; extent2 = ...
0
votes
0answers
34 views

Using OpenLayers 3, the forEach method doesn't actually work, but only within this function?

I'm using OpenLayers 3 with AngularJS. I'm trying to make a factory such that I can generate an object for a tree control. My function (which doesn't actually do anything yet), looks likes this: ...
0
votes
0answers
29 views

How to set a src manually in OpenLayer 3?

I'd like to know how to set manually a src for add one or more icon. I've been finding a method in OpenLayer 3 to set it but, without sucess. For example, time ago I wrote the following code to set ...
0
votes
1answer
22 views

OpenLayers doesn't display US Census-based GeoJSON Layer

I'm getting started with OpenLayers and all was going well until I tried to use my own GeoJSON file. I started with the Cartographic Boundary Shapefiles - Counties from the Census website, loaded it ...
0
votes
1answer
32 views

Retrieve polygon attribute when positionning a point - openlayers / leaflet

Using a client-side webmapping library (openlayers3 or leaflet), I want my user to be able to add one marker on the map. I will then be able to retrieve long/lat coordinates. From that, I want to ...
2
votes
1answer
102 views

parse geoJSON using bounding box and Openlayers 3

I have used Openlayers 3 to give me a bounding box extent and then make a WFS call to Geoserver using those extents and returning a geoJSON and it has worked perfectly, giving me the features within ...
3
votes
1answer
201 views

Sketch event in Openlayers 3 drawing interaction

For drawing Polygon in OpenLayers 2 we could use as follow: function drawEnd(){ ... } function putPoint(){ ... } function sketchModified(){ ... } function cancel(){ ... } var ...
0
votes
1answer
82 views

Does Leaflet layer 'add' event not fire properly?

A popup won't open until the data file has loaded and the layer is added to the map - that's pretty obvious. I figured it would help to bind it to the 'add' event - but that never fires: var l1 = ...
3
votes
2answers
2k views

How do I project my WMS tilelayer in leaflet if I want it to display as an overlay on my basemap if they have different EPSG?

So my basemap is a world Mercator projection and in wfs format and I'm trying to put a WMS overlay in a different projection over it? Leaflet's API didn't give me much info on changing the epsg so is ...