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
39 views

CartoDB - panel info instead of infowindow

I am using CartoDB API to develop a map viewer and I would like to get the information from featureClick into a content panel instead of the typical infowindow. Is there any method to do it directly? ...
0
votes
0answers
24 views

How to change cursor to pointer mode while Dragging & Dropping in OpenLayers 3?

How to edit the cursor to pointer mode while using the ol.interaction.DragAndDrop in OpenLayers 3?
0
votes
2answers
44 views

How to show which layers are currently visible

I feel like this is a rather easy one, I just cant get it to work... Basically, I want to show which layers are visible from a dynamic layer. I see all the objects being returned in the console with ...
0
votes
0answers
12 views

leaflet filelayer.js change click event

First off, I am no Javascript expert. Second, I have a feeling this is nice and simple for someone with skills. I am building a map and incorporating the leafletfilelayer plugin. The plugin works ...
0
votes
0answers
42 views

Problem hosting web map template in local web server

This is the Webmap I have prepared in ArcGIS online. http://www.arcgis.com/apps/Viewer/index.html?appid=c72a0fc5e554462daec7df89bcc3adf4 I have downloaded a sample template from ...
0
votes
2answers
32 views

Use try, catch when querytask times out using JS API

When I do a querytask and the date range criteria used is too vast, I get a 500 internal server error after 1.7 minutes every time (unless the query takes less than 1.7 minutes, then it runs fine). Is ...
0
votes
1answer
68 views

Stop OpenLayers 3 map firing click event after dragging

I have an OpenLayers 3 map with a source of ol.source.MapQuest({ layer: 'osm' }). I haven't added a DragPan interaction, but the map is draggable anyway - which I want it to be. I also have a click ...
0
votes
1answer
21 views

Hash of Feature Layer Graphics

On a web application I'm currently working on, some of the data for the GIS Service is bad. For instance, there may be multiple polygons that should be a singular graphic, but instead they are each ...
0
votes
1answer
39 views

Displaying more than one layer from GeoServer using OpenLayers?

How can I add additional data layers to this code? I tried using "map = new OpenLayers.Map('map', options);" again and set up a tiled layer for buildings exactly as it has been done for roads but not ...
0
votes
0answers
46 views

Connection to Shapefiles and PostGIS

I have this HTML (see below) code, I want to connect to PostGIS to the Shapefiles I have loaded, but I can't find where and how to accomplish that. I want my map to display this Shapefiles when the ...
0
votes
1answer
32 views

Does an event get fired after a Layer has finished rendering in Openlayers 3?

I am rendering about 27000 Markers in different layers on a mapview. Everything works fine on fast devices. I have a problem on older devices (like the iPad3). When i hide one layer and set another ...
1
vote
1answer
35 views

How to toggle selected features by clicking on them in OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html This is my expected result:http://www.cv.nctu.edu.tw/shapefile-js-openlayers/test.html I want to try ...
1
vote
1answer
32 views

OpenLayers map with Nominatim lookup function not working

I am trying to create a simple map with a search function, my minimal example is here: http://jsfiddle.net/TimLucas/vbaupe30/4/ For some reason the coords transformation after the script has received ...
2
votes
1answer
76 views

Why my Shapefile is not loaded into OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/tonywang/shapefile-js-openlayers/ol_simple.html I want to put my Shapefile in OpenLayers. I found an example at ...
3
votes
1answer
35 views

Define a circle extent using the circle tool - arcgis javascript api

I have the following script for drawing a circle and I want to limit the user to a predefined radius: $('#circle').click(function () { clearPreviousSearch(); ...
1
vote
0answers
34 views

Limit Nominatim results tp specific country

I want to limit the search in Nominatim to a specific country and was trying this code: mapPanel = new GeoExt.MapPanel({ border: true, region: "center", map: map, zoom: 7, ...
0
votes
1answer
37 views

How to obtain elevation value from given SRTM data on mouse click in web browser?

I need JavaScript code for obtaining elevation data from SRTM tiff image. I have used Google APIs, but I need for downloaded SRTM tiff image. (SRTM file is being loaded on a base layer, and both ...
0
votes
0answers
30 views

Prevent rendering of a layer until time definition is applied

I want to add layers to a map, with some criteria. Before the layer is drawn, I want to a set a time definition on the client-side to limit the data being rendered. I've tried setting the time ...
1
vote
1answer
60 views

Programatically add feature to Feature Layer with ArcGIS JavaScript API

I've so far been able to add a feature layer from an ArcGIS server, and I've also been able to add an editor widget which allows me to draw to feature with the mouse. The added features are being ...
1
vote
2answers
31 views

Including js file in openlayer.js file

I have this code for showing markers on map: function addUserLayerCSV(){ layer1 = new OpenLayers.Layer.Vector("CSV", { projection: epsg6316, strategies: [new ...
1
vote
0answers
67 views

Waiting on AJAX result in main JS function

So .... my main init()Javascript function has these 3 lines: sarea = GetArea(Uname,UIDfield,Table, document.getElementById("Source").value); darea = GetArea(Uname,UIDfield,Table, ...
2
votes
1answer
36 views

Control to select data source on Leaflet map

I am building a map using leaflet. My data source looks something like this: var districts = {"type": "FeatureCollection", "features": [ {"type":"Feature", "geometry": ...
0
votes
2answers
84 views

OL3 check if point is inside a polygon

When I am adding a point to my web map I want to give it a latter that represent the area where the point is, so I need to know in what area is the point. In OpenLayers 2 I did it like this: ...
0
votes
1answer
69 views

Adding drop-down menu on leaflet map instead of L.control

I have created a choropleth map including several layers from the same geojson layer which is turkeyData in my case.I actually did it and it works fine. But I like to change the standart leaflet ...
1
vote
1answer
24 views

Disconnected Satellite map tiles usable with OpenLayers or other javascript api

I'm looking for satellite map, usable with OpenLayer (or with an other js api), with a good scale (at least 100m, MapQuest stops at 1000m) and avaible for a disconnected mode (avaible for download). ...
0
votes
0answers
90 views

How to add WMS Layer from Mapserver( localhost) on Cesium Globe?

I am trying to add WMS layer from mapserver i.e. from localhost on Cesium Globe with the following HTML code. But I am not able to load or connect Cesium with the Mapserver and nothing is displayed on ...
3
votes
2answers
124 views

Setdrawingmode(null) giving Uncaught RangeError: Maximum call stack size exceeded main.js.27

I have my google map codes running for time where I can draw polygon and polyline without issue. Below are my snippet of codes on how I do my drawing. Unfortunately I got this error Uncaught ...
1
vote
1answer
43 views

CartoDB SQL and returning values

Right I've got this JS function function AreaCompare(sql, UIDfield, Geogname, Table, sourceName, sourceID, destName, destID){ CompareObj = {}; CompareObj.sName = sourceName; ...
0
votes
1answer
23 views

Automatically select the default feature in TemplatePicker ARCGIS Javascript

I am using this example to implement the editing on my map. Editing Without Widget ARCGIS Javascript The code employs a templatepicker which uses the layers on the map to show the features which can ...
0
votes
0answers
26 views

Get latlong at a distance on a path

I have 2 decimal point in lat/lon. I want to divide the line drawn by lat/lon into parts each at a specified distance, lets say 'x' -- all except the last segment will be of length x -- and I need the ...
0
votes
1answer
74 views

Configurable map viewer (CMV) - Find the area of drawn polygon

I am trying to get the area of a polygon and divide that by 16.94 ft^2. I have plugged in a Template I found. I am missing something. I am trying to get the template and my original code to talk. ...
0
votes
1answer
89 views

insert update delete wfs layer to gesoerver on openlayers3

i am using geoserver 2.5.2 and openlayers3 i can show geojson wfs data from geoserver with geojson and edit with interactions on map (function () { showData= function () { var format = ...
0
votes
1answer
70 views

Problem with Cesiumjs sand castle live editor

I have saved a html file from Cesium SandCastle live editor, but I am not able to run that file on a web browser afterwards, even after loading all the JavaScript files correctly. How to make it run ...
1
vote
1answer
42 views

set definition expression based on slider values

Using the Esri JavaScript API I want to control the set.DefinitionExpression values based on a user controlled range slider. The data is loaded from REST as ondemand using: var POP_Total = new ...
0
votes
1answer
71 views

Setting properties of geoJSON in OpenLayers

I have a map with layers that have similar attributes. I want to add a function that when you select a feature in a layer, it searches for a feature with similar properties in another feature (in this ...
0
votes
2answers
43 views

Open Layers Label styling (font size)

I have a polygon dataset that I am symbolizing in OpenLayers using a context to determine the correct color, and also a label for each polygon that I want to alter depending on the zoom level. But ...
0
votes
0answers
20 views

Custom tile area in OpenLayers for every zoom level with a custom tile resolution

For an extend min_x, min_y, max_x, max_y in EPSG:3857 somewhere on the map (eg. france) I have an image cut into n x m tiles and requestable under an URL: http://localhost/map/{x}/{y}.jpeg How do I ...
0
votes
0answers
49 views

API for Java and JavaScript app integration

Are there any APIs to make calls or integrate JavaScript functions to a Java written application? I have come across Rhino's liveconnect.js, but this is uncharted territory for me, and would like a ...
0
votes
1answer
99 views

Finding the closest facility in a feature layer from a webmap

I have created a webmap on which a feature layer is displayed and I'm trying to find the closest facility when the user clicks on the map. Based on Find closest facilities in the Javascript API ...
0
votes
0answers
23 views

Any way to make leaflet.draw polyline finite (i.e. max) distance?

Does anyone have an idea of how I could force a maximum distance when creating a polyline with leaflet.draw? In other words, I would like for the user to only be able to draw a line UP TO 1000 miles. ...
0
votes
0answers
55 views

Adding and removing OpenLayers 3 layers based on a key

I have a map with potentially tens of thousands of areas on it so I draw the map using an ImageWMS layer via GeoServer. I want the user to be able to click on the map and then highlight the area if it ...
0
votes
0answers
55 views

ArcGIS API Javascript Server creating a dropdown menu

I am trying to rebuild this ESRI example with my own feature layers: https://developers.arcgis.com/javascript/jssamples/dataadapterfeaturelayer.html Since I just want a dropdown menu existing out of ...
1
vote
1answer
50 views

Projection Transform in OpenLayers3

I am trying to transform a GeoJSON object of a certain transformation (EPSG:28992) into my current map coordinate system (EPSG:4326). I have been trying to do a couple of things but none seem to work. ...
0
votes
2answers
67 views

Javascript + ESRI + Dropdown menu with layers

Dear people of stackoverflow, I have a script that generates a basemap with a layer that I have put on top of it. I am trying to create a dropdown menu in which the user of my HTML5 page can select ...
1
vote
1answer
41 views

The ordering of layers with CartoDB/Leaflet

Just want to get a bit of clarity about this query from before: Layer order in CartoDB I have a map with a Basemap and I want to draw points between features based on layer featureclicks, The good ...
2
votes
2answers
64 views

How to prevent ArcGIS JS map from failing when using a Bootstrap “hidden” class?

I'm trying to put an ArcGIS Server JS API map within a div with a hidden-sm class in Bootstrap 3, so that the map is not shown on small devices. <div class="row"> <div class="col-md-4 ...
2
votes
2answers
65 views

Javascript API: How can I change renderer on the fly with feature layer hosted on ArcGIS Online?

I am new to Javascript and somewhat new to GIS (especially web applications of GIS). I'm trying to understand how I can have a drop down menu or html buttons to change which data is rendered in my ...
2
votes
1answer
92 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 ...
0
votes
1answer
57 views

Configurable Map Viewer (CMV) - average the values of the points

I have been able to select points and find the sum of the points. What I really need is to average the points. Here is my (acquired from someone else) code for finding the sum. define([ ...
0
votes
0answers
25 views

Legend label failed to send to the print service using ArcGIS javascript

I am try to print my map with legend to PDF format; however, the legend label in the PDF is saying Override 1 instead of the label I specified in class breaks. There are other maps I can print ...