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)

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 */ ...
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 ...
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
3answers
106 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
1answer
90 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 have ...
0
votes
0answers
48 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
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
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
1answer
121 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
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 ...
1
vote
0answers
62 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
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) { ...
0
votes
1answer
46 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
41 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
360 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
81 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
83 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
44 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
47 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
68 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
58 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
219 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
176 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
215 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
38 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
97 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
41 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
141 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
138 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
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] - ...
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 ...
3
votes
2answers
71 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
43 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
92 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
0answers
33 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
211 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 ...
0
votes
0answers
46 views

Adding shapefile from local drive to WebApp using ArcGIS API for JavaScript?

I want to add a shapefile of certain data to my WebPortal (which is currently running on Localhost) how can I do it? I'm using ArcGIS API for JavaScript.
0
votes
1answer
36 views

OpenGeo Suite - Possible to create input form

Is it possible to create a user input form such as a simple HTML form to take user input? The aim of this is to add the user input to the geom data in the DB.
0
votes
1answer
58 views

removeFrom(map) doesn't work

omnivore.wkt.parse("${feature}").removeFrom(map); I select features by this line omnivore.wkt.parse("${feature}").addTo(map); but when I remove from map doesn't work this code works but if I ...
0
votes
1answer
26 views

Features disappear when switching 2D to 3D?

I'm working on OL3-Cesium. Right now my main focus is to add parallel lines to a given line string. That's working perfectly fine in 2D view. But as soon as I switch to 3D view, the parallel lines I ...
0
votes
0answers
72 views

Refresh map after updating chart elements

I need to refresh an openlayers map after updating the size of pie charts in a mapfile displayed on the map (on button click). I cannot refresh the whole page or I lose the data. It works when I ...
1
vote
2answers
218 views

How do I embed the a Leaflet map into my web page, using QGIS2Leaf?

I am generally new to web developement, and web gis for that matter, but I want to embed a leaflet map that I made in QGIS using the QGIS2leaf pluggin, into the html of my webpage, but am having ...
0
votes
1answer
35 views

How do I use filters on multiple layers in Kartograph?

I am trying to create a map of the continental US and Puerto Rico using Kartograph. I am using the shapefiles from Natural Earth, and I obtained the filter keys from the column headers of the DBF ...
0
votes
1answer
109 views

Create a polygon from an array of coordinates in arcgis javascript api

Well I am building a GIS web app using ArcGIS Javascript API , I want to create a user interface in which the user provides an array of coordinates and I have to get those coordinates and create a ...
2
votes
1answer
51 views

X and Y after Albers lat and lon transformation

that is probably a very obvious question but it is melting my brain: when transforming lat and lon to [x,y] (for instance using this code https://gist.github.com/RandomEtc/476238) I get the ...
0
votes
0answers
16 views

Which open source lib to choose from gxp attached with open geosuite 4.5 , heron or core geoext?

My requirements are WMS , WFS-T (editing), printing map, styling , able to edit layout to make a consistent template for application. text search , search by geometry, query , multi-layer ...
0
votes
1answer
74 views

How to protect the loaded json file name and location using html5 and javascript?

The data of markers (not the map) is stored in a json/csv/js file. We want to show all data as markers on the map. But how to protect the raw data file from public access? Following the example on ...
0
votes
0answers
59 views

“require” is not defined in GeoServer's community scripting extension (Javascript)

I'm attempting to use GeoServer's Community Scripting Extension for JavaScript. I've installed it according to the instructions, and when I try to reproduce the WPS Hook example, I receive the ...
2
votes
0answers
191 views

open-source code for the map matching algorithm

For map matching of the GPS data to the network data, there is a algorithm from Schussler, N. & Axhausen, K. (2009a). Is this algorithm released under open-source license ? Where can I find this ...
1
vote
1answer
170 views

Google bathymetry service with OpenLayers Mouse Position

After searching for some days I decided to post this question here, hope someone else can give me some hints about a doubt I have. The thing is that I would like to use the Google Bathymetry Service ...