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)

4
votes
3answers
739 views

Create buffer around point in LeafletJS?

I am using LeafletJS. I want to create buffer around point. after Selecting a point buffer radius will be specifed by user in feet. After searching of awhile I found this link of JSTS. does JSTS ...
0
votes
0answers
17 views

GeoExt.data.WMSCapabilitiesStore with gx_wmslegend

When I use this code (code in bold means for comparison between codes): // create a new WMS capabilities store store = new GeoExt.data.WMSCapabilitiesStore({ url: ...
2
votes
1answer
25 views

Create Chart from Query Task

I need to create a chart from the result of a query task using Esri JS API. Note, the chart does not have to be created with Esri API, but the query runs in that. The result is written to the DOM ...
0
votes
0answers
16 views

Trouble setting up Postgres PostGIS database with GeoServer [on hold]

Last weeks I created an application. I want to import from PostgreSQL a database to GeoServer, so that I will call WFS-T service after to my project using JavaScript. For the first time I have to ...
4
votes
2answers
8k views

Calculate bearing between two decimal GPS coordinates

I'm building a virtual tour application that uses custom panoramas in conjunction with Google's StreetView service. With StreetView, you can have 1 to n links at each particular location to move to, ...
3
votes
0answers
17 views

What is the openlayer.js alternative of unloadinvisibletiles of leaflet.js

I am using open layers with a tile server. I want to load maps while panning and destroy the loaded region when out of screen (Alternative to unloadinvisibletiles of leaflet.js) How am i suppose to ...
-1
votes
0answers
19 views

why am i not able to do WPS chaining? [on hold]

i am trying to write a code in javascript using openlayers (2.13.1) to chain the wps processes on click, but not able to chain the processes . the Error is : Uncaught TypeError: Cannot read ...
0
votes
1answer
15 views

PyWPS output created but not accesible by the Javascript client

The good thing: I've a working PyWPS process. The bad thing: I cannot access the output using the PyWPS Javascript client. What I did. I created an PyWPS python script with one LiteralInput ...
-1
votes
0answers
13 views

Retrieving Spatial Database data in a google api [on hold]

I have created a spatial databasewhich consisit of a table named test.In table there are two fields lattitude and longitude .I want to get this data in My html page which consist of javascript for ...
1
vote
0answers
18 views

Disable doubleclick zooming in Openlayers 3

I've searched for it on the entire web and finally I found on artamstrong.com how to disable a single feature like "mouseWheelZoom". Here is how double click zooming in Openlayers 3 can be disabled: ...
6
votes
1answer
70 views

Mousewheel event being locked by map

I've got a tabbed UI on my web page, the last tab is an arcgis javascript map built with their API. The problem I'm having is that just adding the map and all of the esri / dojo libraries to the page ...
4
votes
2answers
46 views

Access geojson from github in leaflet

I am new to json, github, and leaflet. But I am trying to create a simple application which will render my points which are in geojson up on github. From everything I have read this should work. ...
0
votes
0answers
10 views

'select' listener in xtype combo, scope issue with IF?

I wonder if this is a problem of scope. The thing is that I select an option in a xtype combo (extjs3.4) and that selection at first can be read outside and inside an if section (attached image). Now, ...
0
votes
1answer
393 views

ArcGIS map service layer not loading properly

I'm at a total loss. My initial problem was an issue with the layer not loading at all when the page was set to the full extent, despite having changed the Min/Max Scale settings generously when ...
0
votes
2answers
36 views

OL3 Style function

I am attempting to write a style function within an open layers 3 application that will change the fill color of a circle based on an attribute from a geoJSON piece of data. I have looked over stack ...
0
votes
1answer
28 views

Legend in GeoExt.tree.LayerContainer

Using the code below in this jsfiddle example: tree = new Ext.tree.TreePanel({ renderTo: "tree", root: new GeoExt.tree.LayerContainer({ text: 'Map Layers', ...
0
votes
0answers
5 views

Adding eventListeners makes my geoserver app stop working

I am trying to use OpenLayers.Control.WMSGetFeatureInfo in combination with OpenLayers.Popup.FramedCloud to retrieve info from my geoserver and show them in a popup window. This is my code: var ...
1
vote
0answers
25 views

Run a locator task

I'm working with ArcGIS javascript api and I have a search function that finds a persons address by name and sorts it into a table inside a modal popup. It returns multiple people with the same name. ...
0
votes
1answer
112 views

OpenLayers 3 zooming to layer when source is ImageWMS

When I create a layer using a vector source I can force the map to zoom to the layer using //stuff including setting up defaultStyle var vectorSource = new ol.source.GeoJSON({ url: geoJsonUrl, ...
3
votes
1answer
35 views

How to use external CartoCSS/mss within JavaScript?

I am using CartoCSS to style features in a run-time CartoDB layer (as opposed to a pre-made visualization) but it gets messy doing this within JavaScript: sublayers: [{ cartocss: '#initvisitedfws ...
1
vote
0answers
20 views

styling wms layer using sld in openlayers3

i want to style wms layer using sld in openlayers 3.written part of code shown below.but not any console error messages are shown and not applied styles to layer..... var sld = ...
0
votes
3answers
146 views

Measure Widget Issue - ArcGIS Javascript API 3.11

I am having an issue with the Measure Widget in my application after updating to 3.11. The widget does not appear after the application loads. I have checked my code and do not see an issue, also ...
2
votes
2answers
292 views

Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for ...
6
votes
3answers
854 views

Help needed using REGEXP for address string parsing

Using JavaScript, my aim is to create an "intelligent" address search function with a single textbox (rather than separate textboxes for house number, street name, street type, suburb, etc). I'm ...
1
vote
1answer
29 views

Geoserver WFS GeoJSON layer in Leaflet, having trouble diagnosing 'Uncaught TypeError: undefined is not a function (Anonymous Function)' error

Pardon me if this has been addressed, I searched as far as I could for similar errors. I'm trying to serve a large amount of polyline data as a geoJSON layer from GeoServer to a Leaflet instance. ...
1
vote
0answers
45 views

library for minimum bounding box “by width” in javascript or python

I'm looking for a library (or at least a code snippet) to calculate the minimum bounding box "by width" in javascript or python. Below is an illustration from the ArcGIS documentation of that ...
1
vote
1answer
17 views

Openlayers 3 circles from geojson not working with layer tile source different from TileWMS

I am working with openlayers 3 with a layer from mapbox or openstreetmap and I need to draw some circles on it. I am able to print the circles with a view with a projection EPSG:4326, but then I have ...
1
vote
1answer
58 views

Can I plot points on a map using JSON data from a Node.js API?

I am new to the arcGIS JavaScript API. I have a Node API that is providing geographical information in JSON. I have google'd for examples and searched for solutions on this web site. Can anyone ...
2
votes
3answers
1k views

ESRI proxy page not working properly + CORS + cross domain scripting

I have set up a proxy page. I am using jsp version of proxy page. I have set up a server URL which will point to my Java. When I load the my page which the proxy URL has set in its html it will work ...
0
votes
1answer
104 views

get and change style property openlayers

i need to change the property of some style after its created, and i need to change it with knowing only the string of the property name. i am getting string like "fillColor" and value like "blue", ...
1
vote
0answers
17 views

Create Popups With Multiple WFS Layers

I am having trouble displaying popups on points plotted on my Open Layers 3 map from two different WFS sources. Both are PostGIS tables coming from geoserver. var popup = new ol.Overlay.Popup(); ...
0
votes
1answer
142 views

JS/browser API library to show/interact with many markers with the best performance?

What's the best Javascript library that can show about 50000 (and more) clickable markers without resorting to things like clustering markers,etc? The markers are clickable and I want to associate ...
1
vote
1answer
141 views

Jsonp call to geoserver

If I try, like this way: $.ajax({ jsonp: false, jsonpCallback: 'getJson', type: 'GET', url: ...
0
votes
2answers
24 views

Can I include data from multiple rows in CartoDB infowindow?

I have a visualization in CartoDB of a set of data points in table pointlayer. I am using cartodb.js and have a nice map for browser consumption. When a user clicks on a point, I'd like to run a sql ...
7
votes
3answers
2k views

Mobile offline mapping and editing of shapefiles?

I've got a client that wants to create a mobile app that can view and edit shapefiles stored locally on the device to enable it to work offline. There is a possibility of converting the shapefiles to ...
0
votes
2answers
42 views

How to use cartodb.js without storing sql in javascript

Using cartodb.js, how can I change the layer definition without building the sql dynamically in javascript and passing it as a parameter. Aside from revealing my table structure (not a huge deal at ...
1
vote
1answer
6k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function ...
0
votes
1answer
38 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", ...
1
vote
1answer
27 views

Openlayers dynamic viewport width and height assignment

I display an openlayers map in a html page by placing it in a tag and assigning a css class to it so as to set its dimensions (map size and map bounds). i then attempt to dynamically create a style ...
4
votes
1answer
54 views

Legend items to appear / disappear simultaneaously with Layer turned on/off in Layer Control

I have a number of layers that can be turned on and off with a Layer Control. I’d like the description of each layer to show in the legend if it's turned on. And disappear again as soon as the layer ...
2
votes
1answer
319 views

How to write addressToLocations onError?

How can I write a code for checking the error condition in Javascript (ArcGIS) for addressToLocations(params, callback?, errback?). if somebody entered an invalid address- how can I call error ...
6
votes
1answer
416 views

Why do ArcGIS Desktop 10 HTML popups give JavaScript/HTML Error?

Using ArcMap 10 Desktop HTML Popups. The issue I am having is that the html < select > elements aren't working - you can select it and use the arrow keys to navigate through(up/down) the list but ...
0
votes
0answers
54 views

Leaflet vs Openlayers vs Geoserver for overlapping polygons application

I have 3 layers of vector polygons(about 80 polygons - 1MB geojson each but I haven't simplified any yet) displaying school territories (kindergardens, primary and secondary education) and I want to ...
0
votes
0answers
26 views

Different results of fullscreen mode in OpenLayers 3

anyone here have already met similar problem like me? My original application is not viewing correctly (in all browsers) in fullscreen mode, which is openlayers 3 functionality. The problem is with ...
0
votes
1answer
14 views

OpenLayers 3 get map by id or class?

How can I get hold of a OpenLayers3 map object associated with a specific id or class (unique)? I searched and found this thread, which says something like: var map = ...
1
vote
0answers
40 views

Using Odyssey.js with Cartodb.js

I'm looking to use Odyssey to create an interactive introduction to various data layers on an interactive web map I've created using CartoDB.js. I'd like to have different data layers turned on / off ...
1
vote
1answer
341 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
1
vote
2answers
767 views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
1
vote
2answers
278 views

How to convert Shapefile to TopoJSON with grouping neighbor shapes by some criteria

I have a shapefile with countries, which I convert to GeoJSON using ogr2ogr and then converting that json to another TopoJSON, using topojson command-line tool. Everything works like charm, but now I ...
0
votes
0answers
21 views

single quote escape for arcgis server rest query

This might possibly belong in stack overflow so let me know if I I should go there instead. I'm trying to create a simple query using the arcgis rest api and javascript. I think my problem is with ...