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)

7
votes
2answers
4k views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
0
votes
1answer
80 views

Convert Leaflet WMS layer to Leaflet GeoJSON layer

Using the Leaflet API I am adding a WMS layer through the L.tilelayer.WMS feature. This feature includes only a certain amount of options such as 'layers','crs','style' etc. Through the Leaflet ...
1
vote
2answers
32 views

Problem with MapServer WMS

Below code is showing the addition of mapserver file in openlayers 3, it is successfully showing me image in the browser but when i zoom that image it does not zoom. It comes back to originial view. ...
0
votes
1answer
29 views

how to customise toobar in Leaflet.Draw plugin?

I Down load the Draw.js and one ccs file to get use of the Leaflet.Draw plugin now need to customise the toolbar(i.e want only polygon and marker)
1
vote
0answers
26 views

Telerik ajax RadMap

I am using telerik RadMap with client side binding in the OnInitialize client event. Copied from the examples: function OnInitialize(sender, args) { var originalOptions = args.get_options(); ...
0
votes
1answer
66 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
27 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
58 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
133 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
61 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
69 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
51 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
44 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
135 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
211 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
60 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
43 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
39 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
33 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 ...
4
votes
2answers
225 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
64 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
70 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
957 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
157 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
70 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
151 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
335 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
49 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
13 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
135 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
96 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
206 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
229 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
168 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 ...
0
votes
1answer
57 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
611 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
46 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
78 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
80 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
344 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
40 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
56 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
21 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
46 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
1answer
24 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
34 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
158 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 ...
0
votes
1answer
118 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 = ...