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

Line dash not working OL3 (Openlayers 3)

I want to display a dashed line in a vector layer, as the it's shown in the Documentation there is a propriety called lineDash , but it didn't work for me here my code : var iconStyle_line = new ...
1
vote
0answers
11 views

How to sync html list with markers layer in openlayers?

I have a osm map and with openlayers i can mark a place on it and also have popup for markers, the problem is if i show all markers in map and i have a list, how to show each marker popup by clicking ...
3
votes
1answer
46 views

ArcGIS Javascript API on Wordpress 4.1

Edit: to keep things organized: This one IS working (WordPress 4.0.1): https://topografieindeklas.nl/topotrainer/provincies/ This one IS NOT working (WordPress 4.1): ...
2
votes
1answer
20 views

OpenLayers3: setCenter seems not to work in jsfiddle

I'm trying to replicate an example from the OpenLayer Examples, specifically this one: http://openlayers.org/en/v3.0.0/examples/animation.html The problem is that in my jsfiddle I cannot get all the ...
0
votes
0answers
39 views

Getting coordinates perpendicular to AB

I noticed that Google Mapmaker has a function that when you hold shift when drawing a shape you can see the perpendicular line. I want to recreate this function to use in the google maps api v3. So ...
0
votes
0answers
55 views
+50

Error with GeoExt.data.WMSCapabilitiesStore + 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: ...
0
votes
0answers
21 views

Trouble setting up Postgres PostGIS database with GeoServer [closed]

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 ...
3
votes
0answers
23 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
16 views

Retrieving Spatial Database data in a google api [closed]

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
21 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: ...
-1
votes
0answers
23 views

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

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 ...
-1
votes
1answer
25 views

How to remove WMS layer from OpenLayers

How to remove added WMS layer from OpenLayers ? I have seen a link here.But I did n't get clearly. Please help? I have added the WMS layer as follow <script ...
0
votes
1answer
16 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 ...
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
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
26 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
2answers
43 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 ...
4
votes
2answers
47 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. ...
1
vote
0answers
21 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
1answer
31 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', ...
3
votes
1answer
41 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
1answer
33 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
51 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
18 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
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
2answers
27 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 ...
0
votes
1answer
40 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", ...
4
votes
1answer
56 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 ...
0
votes
0answers
28 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
18 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 = ...
0
votes
0answers
25 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 ...
0
votes
2answers
52 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
0answers
11 views

Displaying a graphic layer derived from an arcgis server geoprocessing task on a webapp map

I know this should be basic.... but I am trying to get an ouput from a arcgis server geoprocessing task of data type "GPFeatureRecordSetLayer" to be added into a map on a webapp. here is the code (the ...
0
votes
0answers
59 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 ...
2
votes
1answer
28 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
15 views

line chart similar to Esri Histogram Time Slider [duplicate]

I am looking for a solution similar to the one provided by the Esri DIGIT class "HistogramTimeSlider" but instead of a histogram, I would like to use a line chart. Anybody seen a suitable reference?
1
vote
1answer
28 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 ...
0
votes
0answers
24 views

How to Show the Lat/Long of Marker in a Textbox if it has been clicked

function getInfo() { $.getJSON("get_info.php", function (data) { for (var i = 0; i < data.length; i++) { var location = new L.LatLng(data[i].lat, data[i].lng); ...
0
votes
0answers
17 views

How to add 'title' or tooltip to navigationHistory in openlayers

I want to add tooltip/title to NavigationHistory Control in openlayers. I tried 'title' property but its not working. My code is var pDiv=document.getElementById("maptools"); var ...
3
votes
1answer
57 views

How to get/pass token with ajax call to secured ArcGIS REST Service

I have a web map application that was written in HTML & JavaScript (using the ArcGIS JavaScript API). It desplays a few services that reside on an ArcGIS Server (10.2). It also has a custom legend ...
1
vote
0answers
45 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
2answers
78 views

Openlayers 3 spyglass example (advanced functionality)

I would like to use openlayers 3 spyglass example inside my project. The problem is when I want to use selection for layer, which will be inside spyglass circle. I can't get it working, I don't know ...
0
votes
1answer
41 views

Transfer Data from Database to Leaflet POP UP

Good Day too all! I just wanna ask a little question. Ahmm how do you show data from database to leaflet pop up? Here is my code in php select command <?php $db = new ...
2
votes
1answer
26 views

OpenLayers Only draw features in a vector layer within view

I am dealing with a kml that I am importing into openlayers as a vector layer. This kml has many features so it dramatically slows down the web app. I would like to make it so only the features within ...
1
vote
1answer
21 views

Can't Get my legend on a swipe layer map

I'm having trouble getting a legend on my swipe layer map. I'm new to Javascript and took most of the code from the API reference but can't get the legend to show up for either layers. I'm Hoping ...
1
vote
0answers
27 views

How to create a infotemplate that displays automatically

I have created a postcode search that that highlights a polygon and zooms in. but I would like it to display a infoTemplate box with having to click in it. I want it to show when the function runs. ...
1
vote
1answer
63 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 ...
0
votes
0answers
49 views

Apply css styles to layers in openlayers3

define layers and styles using openlayers3 API. i need 2 apply css styles for layers.for that code is in below used //applying styles for wms layer var fill = new ol.style.Fill({color: 'rgba(237, ...
1
vote
0answers
7 views

Using statisticdefintion in a querytask

I have a question about using QueryTask to accomplish to jobs: Identify unique value for a county in a graphics layer via mouseover. This unique county value (from a specified field) is used to ...
1
vote
0answers
23 views

How to get bounds coords by center LatLng point, width and height in pixels and zoom?

I have to calculate bounds coordinates to query mongodb box on server side to get data before google maps is loaded. How can I get four LatLng corners by center LatLng point, window width and height ...