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
0answers
28 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
20 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
30 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
75 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 ...
2
votes
1answer
121 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
56 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 ...
0
votes
1answer
37 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 ...
1
vote
2answers
35 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 ...
7
votes
3answers
3k views

Z-index in OpenLayers 3: layer ordering in OL3

Is there a method to cjange Z-indexes of layers in OpenLayers3 like it was in old version? map.setLayerIndex(markers, 99); //set the marker layer to an arbitrarily high layer index and I need to ...
2
votes
2answers
382 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
0
votes
1answer
29 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: ...
0
votes
1answer
546 views

How to use cartodb.js with API key for privacy of data

I would like to use cartodb.js in my web page reproduce a visualization that I created at CartoDB. But I want to keep private my visualization and data at CartoDB (and I am going to secure my web ...
1
vote
0answers
87 views

How do I modify the WebAppBuilder "LayerList' widget to use radio buttons instead of checkboxes?

I've downloaded the developer version of the Web app builder and installed in on my machine. I can open up the widget '\LayerList\LayerListView.js', and I have been exploring the source code. I would ...
0
votes
3answers
328 views

javascript function to search all OpenLayers vector features covering a pixel

I have an OpenLayers map that draws features in a vector layer. The features are selectable and have a popup on select. Unfortunately in a lot of cases the features overlap so it can be impossible to ...
2
votes
1answer
537 views

How to get the feature location in OpenLayers v3

After I am using the drawing interaction or modify interaction I have a listener that returns the feature that modified or added. Example draw.on('drawend', function (event) { // get the feature ...
2
votes
0answers
44 views

GeospatialPDF javascript access

Using javascript in GeospatialPDF, is it possible to zoom in to an extent, say when the document is opened the first time ? To what extent can I use javascript to access the geospatial data? pan, ...
0
votes
0answers
32 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
35 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 ...
2
votes
1answer
282 views

OpenLayers - cannot set layer opacity

I have the following problem: by default, you can simply change the opacity of layer by writing for example: layer.setOpacity(0.3); But when I add it to my map SelectFeature controls, my layer is ...
0
votes
0answers
70 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 ...
0
votes
0answers
27 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> ...
0
votes
2answers
158 views

Converting area of a polygon from steradians to square kilometers using D3.js?

How can I find the area of a polygon in square km using D3.js? I'm not even really sure whether to use d3.geo.path.area or d3.geo.area. Here is my code (JSFiddle): var d = { "type":"Feature", ...
0
votes
1answer
86 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 ...
1
vote
2answers
2k views

Loop over features of a GeoJSON object from CartoDB

I have just little knowledge about HTML and JavaScript. Nevertheless I was playing, copying and pasting around with Leaflet and CartoDB. I want to display the features GeoJson in a table. This is ...
2
votes
0answers
45 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
17 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
95 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 ...
0
votes
1answer
31 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
41 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
0answers
38 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
24 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 ...
1
vote
2answers
107 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
27 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
0answers
33 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 ...
2
votes
2answers
12k 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
1answer
60 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 ...
2
votes
1answer
49 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
14 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 ...
1
vote
1answer
150 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 ...
2
votes
2answers
2k views

Add point to center of polygon graphic in the Esri javascript api

I’m using the ESRI JavaScript API 3.3 to develop an application. I am selecting parcels and adding a graphic for the selected polygon. What I would like to do is add a point marker to the center of ...
2
votes
0answers
99 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
78 views

How to add custom basemaps to BasemapGallery

I would like to add my own custom basemaps to the BasemapGallery. Is there any way I can create my own BasemapGallery with only my maps? I am using the ArcGIS API for javascript. EDIT: for clarity I ...
0
votes
0answers
36 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 ...
1
vote
1answer
74 views

Load external geojson file into leaflet map

Have studies this thread but not getting desired result. My index.html looks like this: <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>GeoJSON ...
5
votes
1answer
318 views

How to reference the ArcGIS Server JS API using RequireJS

When using RequireJS to load a JavaScript library from a CDN, an example syntax is shown at https://github.com/requirejs/example-jquery-cdn: requirejs.config({ "paths": { "jquery": ...
1
vote
1answer
42 views

Select / Drag or by rectangle CMV Application

Anyone able to suggest to this noob if there is a way to change the selection option in my CMV application from individual polygons (one at a time) to an option of selecting multiple polygons at once ...
2
votes
2answers
2k views

Add GeoJSON layer to OpenLayers 3

I have a GeoJSON file called mygeojson.json and I want to add it as a layer in OpenLayers 3 on top of an openstreetmap layer. So far I could display the openstreetmap world including zoom etc. but for ...
0
votes
1answer
37 views

Tips for learning to work with geoserver in Javascript

After succesfully being able to work with the ArcGIS Javascript API in a webpage I want to learn to work with Geoserver. I have downloaded Geoserver and uploaded one shapefile. Now I am trying to call ...
0
votes
1answer
41 views

Can KML layer order be set in the CMV

I just started exploring the CMV about a week ago as an option to replace our Flex Viewer based configurable web mapping applications. So far it seems to be meeting all our needs however I have run ...