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
49 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 ...
0
votes
1answer
62 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
1answer
61 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
1answer
49 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 ...
0
votes
1answer
66 views

OpenLayers 3 how to keep original image extent

I'm new at ol3, I'm trying to display my GIS view by updating my ol2 code. I created the projection and I can display my static image but I'm obliged to use local extent [0, 0, 1024, 968] instead of ...
0
votes
1answer
41 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
2answers
47 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
0answers
33 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
41 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
1answer
30 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
134 views

Adding Multiple JSON Layers to Leaflet Map

I'm trying to put two different json files over a single map. One is drawn by zip code boundaries, the other is county. For some reason, I can't get my leaflet to work. IF someone can help point me to ...
3
votes
1answer
228 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 ...
2
votes
1answer
110 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 ...
1
vote
1answer
61 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 */ ...
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 ...
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
2answers
78 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? ...
0
votes
0answers
31 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
51 views

Multiple GeoJSON Layers

I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I'lve look ...
0
votes
0answers
38 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: ...
1
vote
1answer
64 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
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
1answer
87 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 = ...
-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 ...
1
vote
0answers
49 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 ...
2
votes
2answers
53 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) { ...
0
votes
1answer
39 views

Esri JavaScript API ApplyEdits update not working

When I attempt to applyEdits as an update to my application I receive the following errors: I uploaded my most recent revision on Github at: ...
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 ...
1
vote
2answers
218 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
1answer
70 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
39 views

Disable feature popup when creating new simple marker

I have a leaflet map with some loaded polygon layers. When using the Simple Markers plugin, i would like to create a new marker on top of an already existing polygon feature, but i can only click the ...
1
vote
2answers
45 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", ...
0
votes
1answer
60 views

How to prevent Leaflet from loading tiles from server

I am currently developing a couple of solutions with LeafletJS and it frustrates me that my Firefox browser loads the tiles from the server (e.g. Stamen or OSM) and not from cache every time I reload ...
0
votes
1answer
51 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: ...
4
votes
1answer
116 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 ...
1
vote
1answer
101 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 ...
2
votes
1answer
163 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 ...
0
votes
1answer
37 views

moving user by gps and show interested points

Is it possible in a Web application with google maps, to use a user his mobile gps and when move and is near on an interest point such as hotels, interested point i have stored in a Postgresql ...
1
vote
2answers
82 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 ...
0
votes
0answers
37 views

Importing tif image from PostgreSQL Database to webpage

I am trying to import tif images from PostgreSQL Database to my website. In the website, I need to make a button control which will open the images. I think I have to use Pyhton as a server side ...
0
votes
1answer
112 views

GeoJson and D3.js multipolygon

I have this geometric shape file, so no map of a city. I store the two Shapefiles in a GIS database as a geometric form. Now, I want to visualize the geojson data. I created the GeoJson data ...
2
votes
1answer
118 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
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] - ...
1
vote
0answers
42 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 ...
3
votes
2answers
69 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 ...
0
votes
0answers
36 views

Set destination address using Esri Directions

I am using the sample on the Esri JS API and would like to set the destination of the directions to always be my address; any idea how to do that? The code to do this is: <!DOCTYPE html> ...
2
votes
0answers
70 views

OpenLayers 3 xyz layer problem

I'm going to host a customized xyz tiled layer so I tested on my local machine to add that layer to OpenLayers Map control. I've already rendered some tiles using generate_tiles.py and Mapnik. I've ...
0
votes
1answer
27 views

SVG image color to be changed by CSS when using ArcGIS API for JavaScript?

I have a image "a.svg" (let's say). I want to change the fill attribute of this svg symbol using CSS. I use this image in a picturemarkersymbol to display a graphic on the map. Is it possible to ...
0
votes
1answer
139 views

Adding in multiple layers in OpenLayers 3

I am trying to add in the following two layers into my OpenLayers 3 map. The issue i'm having is that whichever one is written in last is the only one that is showing. I imagine there is a way to ...