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
6 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 ...
1
vote
1answer
32 views

Why my Shapefile is not loaded into OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html I want to put my Shapefile in OpenLayers. I found an example at ...
2
votes
1answer
9 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
19 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
16 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
17 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
32 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
16 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
34 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
22 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
26 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
25 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
0answers
12 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
45 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
102 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
36 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
16 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
24 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
41 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
53 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
41 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
21 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
48 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
26 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
12 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
34 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
63 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
12 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
28 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
39 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
34 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
45 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
37 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
55 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
50 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 ...
0
votes
1answer
43 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
21 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 ...
1
vote
1answer
60 views

Configurable Map Viewer (CMV) - select by drawing polygon around points, then average the values of the points

I have seen this question and have tried the code suggested: Adapting ESRI ArcGIS API for JavaScript Feature Layer With Selection sample for use in Configurable Map Viewer (CMV) But I have been ...
1
vote
1answer
34 views

Automate testing of web app based on ArcGIS JS API

So, there are multiple products that can let you automate testing interaction with web pages. I have used Selenium IDE for some time now and it works great for creating unit tests for HTML elements on ...
1
vote
1answer
49 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
2
votes
2answers
70 views

Create a layer selector when making a map at runtime for CartoDB

Using the same theory to create a search box at runtime, (such as here), I wrote this code: var l = cdb.vis.Overlay.create('layer_selector', map.viz, {}) l.show(); $('#map').append(l.render().el); ...
2
votes
1answer
41 views

SQL query as part of featureClick in CartoDB.js

I am a complete novice at both Javascript and SQL so am learning as I'm going with this! I have made a webpage that shows a map with a layer of points on the left hand side of the page. What I want ...
1
vote
1answer
50 views

Leaflet.js add/remove control from Map

I am attempting to combine two fine plugins Leaflet Easy Button and Leaflet Routing Machineand i can't quite get it to work. what I want seems simple enough, I would like to have a button that when ...
2
votes
1answer
24 views

Toggle Layers in OpenLayers does not work

I am trying to make a map in which I can toggle layers on and off in the navigation bar. A simple version of my code is in the following JSFiddle: http://jsfiddle.net/TimLucas/3cqsmc2L/ If you click ...
0
votes
1answer
35 views

Converting VBScript to JavaScript for labelling in ArcGIS Desktop?

I have a VB script used by ArcGIS 10.2 for Desktop to label different types of streets based on vales present in a specific field. I am a novice at Python but VB and JavaScript are beyond me. I need ...
1
vote
1answer
59 views

ArcGIS javascript API setDefinitionExpression returns wrong result set

New to GIS and ArcGIS. I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. ...
1
vote
1answer
79 views

select tolerance or snapping in OL3 (Openlayers 3)

I'm using openlayers3 in a mobile application , my problem is that I find a big difficulties to select features using my finger even with a touch pen (I have to be more precise in my click or ...
0
votes
1answer
53 views

refresh the map Ol3 (Openlayers3)

Hello I'm using ol3 in a mobile hybrid application using sencha touch2 , so I start by drawing a polygon inside a map , after validating this drawing I redirect the user to an other form in order ...
2
votes
1answer
79 views

Choosing a platform for developing opensource GIS web application.

I am from a non programming background. I started learning GIS opensource web applications from last 3 moths. Now I am using only notepad++ for writing codes and I am familiar with javascript, HTML ...
2
votes
0answers
62 views

How to adapt layerswitcher to include listboxs

For my project I needed something that allowed the user to change the application´s layers and the best solution I found was this one layer switcher since openlayers 3 does not support a layerswitcher ...