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)

1
vote
1answer
25 views

How to color arcs with arc.js?

I've been using arc.js and I was trying to see if there was any way to color the arcs, except for the normal blue shown(ex). I tried looking around with the arc options, but I couldn't really find ...
0
votes
1answer
90 views

Drawing circle with OpenLayers3, but not seeing on map?

I am trying to draw a circle on a map, using open layers 3, but I am not sure why the circle is not rendering. My expectations with the code below is that is should be centering on -73.5971431341708, ...
0
votes
0answers
37 views

display local tiles with openlayers that are generated by maptiler from a (.tif) georeferenced image

im working on a mobile app and trying to use my locally stored tiles that i generate using maptiler software. after tiling my image.tif i got many folders of png images and two other files : ...
0
votes
1answer
50 views

Drawing arcs/curved line/arrows with Leaflet using method other than arc.js?

I've been trying to find a good way to draw arcs or even arrows dynamically with Leaflet.js, but I haven't come up with much. I tried arc.js, however I was having problems with that approach, and I ...
0
votes
0answers
17 views

Keep NoData values when using gdal_merge

I'm using gdal_merge to join several BioClim rasters, which I will then feed into a Java program that "snaps" points to the nearest BioClim raster tile of non-NoData value. However, when I run ...
0
votes
1answer
61 views

Get array of LatLngs from ArcGIS feature layer polyline using Esri-Leaflet

Leaflet has a method built into the polyline class to return an array of all LatLng coordinates of the line. It would look something like: var latlngArray = polyline.getLatLngs(); Esri-leaflet, the ...
1
vote
1answer
43 views

ESRI Print Task (export web map) returns 500

I tried to export web map(Esri) with print task service. it works in localhost and in staging.xxx.com(http) too.But in preview.xxx.com(https) , it throws the error 500: Error performing execute ...
0
votes
0answers
40 views

How to find angle between 3 points on sphere? (in javascript)

How to calculate angle between 3 points on sphere? Currently i've got function correct for cartesian space: function find_angle(A,B,C) { var AB = Math.sqrt(Math.pow(B.lon-A.lon,2)+ ...
0
votes
0answers
44 views

How to scale polygon to obtain specific area in javascript?

I have got a source polygon (saved as standard js array). I want to scale it down to obtain new destination polygon in the centre with 1/3 of source area. On the cartesian space i just scaling down ...
0
votes
1answer
36 views

How to divide line into three equal parts?

I have a problem with line division. I'm writing a program in JS/C++ generating KML files. I was trying to divide a line using my own function (which is correct on cartesian space): var part1Lon ...
0
votes
0answers
38 views

Is it possible to select and highlight a polygon that contains points in one cluster in openlayers 3

my question is I need to select one cluster for that cluster there will some points. Right now I am able to select points in one cluster selected from the drop down. i have added markers to it. now ...
1
vote
1answer
96 views

highlight feature with click in mapbox gl

I have a geojson layer of streets that are highlighted when moused-over. My objective is now to highlight individual streets red with a click event. Only one street should be able to be ...
1
vote
1answer
45 views

Sortable list of layers

I want to create a sortable lists of layers using jquery ui. I'm trying to use .setZindex() and .index() method. I think that index of <li> does not refresh after order changing. I'm not ...
0
votes
0answers
40 views

OpenLayers 3 doesn't show KML layer

I'm trying to add a KML layer in OpenLayers 3 but nothing is showing. Here is my script: var projection = ol.proj.get('EPSG:3857'); var mapa = new ol.layer.Tile({ source: new ol.source.OSM() ...
1
vote
1answer
62 views

How to create a heatmap with numbers using Leaflet map?

I wish to create a heatmap like this one at http://www.trulia.com/local/san-francisco-ca/tiles:1|points:1_crime With the number changes at different zoom level - the number can appear in a ...
0
votes
2answers
52 views

Leaflet: Capturing points for features inside circle

I'm using the leaflet draw tool to create a circle and then finding the points inside the circle. My data is from GeoJSON, and the code works as far as figuring out how many points are inside, but I ...
0
votes
0answers
49 views

Javascript ApI errors from chrome console:Uncaught TypeError: Cannot read property 'domNode' of undefined

I am using Javascript API(CMV Template) for customizing my search widget. The widget will be shown as a link on a website header. But it kept returning errors. Error1: ...
0
votes
1answer
58 views

Loading Leaflet raster layers asynchronously before adding them to the map?

I am working on a web application where users can view sequences of 5-10 GeoTiffs overlaid on a map, and played like a slideshow - show the first Geotiff, wait a few seconds, show the second, and so ...
0
votes
0answers
20 views

How set base layer and wms layer seperate in openlayer3

here I want osm and mapquest to be the default layers without initializing in the map. Please suggest var osm = new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'osm', isBaseLayer: ...
0
votes
0answers
71 views

OpenLayers 3: update map using ajax map get slow

My app is reading features from the server and updates map every 5 seconds. I have two issues 1) Animation is not working 2) It gets very slow after a while Does anyone have idea what is wrong? ...
2
votes
1answer
47 views

List of coordinates for earth locations in Cesium?

All of the examples in Cesium show coordinates for the locations in the code. For example, for Wyoming they show the following. Where can we get these coordinates from? If I want to do Arkansas, is ...
1
vote
0answers
66 views

ESRI Cluster layer dynamic label colors

I am using extras/clusterlayer to render clusters for a uniquevalue renderer.. all that works well and good except that the label colors are all white/black/whatever you set them to.. I though I'd ...
0
votes
0answers
27 views

Openlayer3 prevent resize feature on zooming

im trying to migrate my simple app from openlayers 2.x to openlayer 3.x First issue is features are getting smaller when i'm zooming in map. function init() { populateStationList(); ...
1
vote
0answers
48 views

Leaflet custom info control update with extra parameters

I used custom info control to show information.The below code is working: var info = L.control(); info.onAdd = function (map) { this._div = L.DomUtil.create('div', 'info'); this.update(); ...
0
votes
1answer
190 views

Display geojson on WMS images in openlayers 3

Here actually am trying to achieve multipolygon on wms layer in openlayers 3. In this i'm calling a php file which is giving the output of geojson format but i don't have any idea where i'm doing . I ...
2
votes
1answer
54 views

Update Bootstrap Switch with Leaflet Layer Group

I have this JSFiddle that shows two example layers that can be toggled on and off using the Bootstrap Switch to add and remove them from the map; this works fine. The problem I am having is updating ...
1
vote
0answers
19 views

Problem in adding geoJSON “info”

I have problem with display geojson "info".When I "click" on geojson layer I see also previous "info". In result I see multiple information. I would like to see only one info . (3 times i cicked in ...
1
vote
2answers
144 views

Drawing box arround text in OpenLayers 3?

I need text labels with surrounding a box and a specific fill color. Actually I have the following function which only shows the text but I don't know how to draw a box around the text. Text length is ...
0
votes
0answers
31 views

How to getfeatureinfo results in a column than a row from geoserver postgis openlayers

Below is a snippet of a code I modified from openlayers. Basically, I click on a wms map and data from postgis is queried by geoserver and served on a single row table. There are 11 variables in the ...
3
votes
1answer
134 views

Leaflet: How to style my polygons in a GeoJSON layer?

I am trying to figure out why my polygons are not changing color based on a value I have in my GeoJSON. I've set up a hypothetical test here to replicate my issue here. JSFIDDLE link here My data ...
3
votes
2answers
111 views

Leaflet JS - Add text to circles

I am trying to create a map using Leaflet with circles that indicate distances on the map at current zoom level (map scale). See illustration below: I know how to calculate sizes and update the ...
1
vote
1answer
45 views

Adjust center of the map based on marker position Openlayers

I have a map in which a moving marker is placed to represent a vehicle. I am using setCoordinate() method to move the marker. I need to set the center of the map to the position of the vehicle ...
1
vote
1answer
35 views

Cartodb sql not executing

I am a beginner, learning the cartodb-API. below is my javascript code which is below my body tag in the HTML page. The map, together with the points are loading correctly but the SQL command is not ...
3
votes
3answers
174 views

OpenLayers3 and GeoJSON data with null features

I am new to OpenLayers and I'm trying to label features on a map using a GeoJSON data. Here is my code: var layer = new ol.layer.VectorTile({ source: new ol.source.VectorTile({ format: ...
1
vote
1answer
67 views

Mapbox personalized icons with cluster and filter checkbox

I have created a map using mapbox. I add icons from an Url and a type of "filter". But I want to add a marker cluster and in and also that the filter function with checkbox to select more than one ...
0
votes
0answers
58 views

Display Leaflet WMS Layers from same source on different panes

I am using the Leaflet WMS plugin to add in layers to my map via a WMS. I have the following code below that adds all of the layers using the same source but as separate layers. However, I want to ...
2
votes
1answer
50 views

Easiest way to display or draw low-detail maps on a WebApp

I need to display data sets, e.g. a bunch of point-based JSON files of weather forecasts, on a not-so-detailed map. The map should not be as detailed as a full-blown Google map (with roads, names of ...
1
vote
0answers
30 views

Get grid area from geographic coordinates

I have a list of geo coordinates. What I want is a list of grid areas and a number of geographic points in that area. By doing this I can get the information in which areas in the world the most ...
1
vote
1answer
42 views

OpenLayers 3: Vector Layer loses styling when map pans or changes zoom

I'm working on switching from OpenLayers 2 to OpenLayers 3 and supplementing my reading of The Book of OpenLayers 3 by trying some things out on my own. There's a project that I'm building here that ...
1
vote
1answer
51 views

Mapbox Geocoding and dropping single marker

I added Mapbox's Geocoder control and the function to have a marker appear in the found location to a map. My problem is that every new search now renders a new marker. What I would like is that once ...
2
votes
1answer
104 views

How to get the current user location automatically every “x” seconds and put it on a Leaflet map?

I need to get the current user location automatically every "X" seconds (5 or 10 sec.) and put it on a simple Leaflet map. I've seen the Leaflet on Mobile sample here ...
0
votes
0answers
58 views

Moving to CartoDB from Fusion Tables - User interaction with Map and Table data

I currently use fusion tables with great results. I am now looking for advice as I am contemplating moving to CartoDB. I have a need for users to be able to interact with mapped data in a spatial ...
0
votes
0answers
16 views

OpenLayers.Markers popup doesn't appear with multiple markers

Trying to get the popup to appear but it only appears for the last object in arrObj. I'm not sure if adding these listeners all together is a good idea but I can't figure out a better way (arrObj is ...
0
votes
1answer
64 views

Geolocation is not working on my mobile device (USER DENIED GEOLOCATION) - Openlayers 3

I have the Openlayers 3 Geolocation API working on non-mobile browser correctly, but I get 'User Denied Geolocation' error testing on mobile devices. What could be the reasons of this error? If it ...
1
vote
0answers
22 views

Add layers dynamically on a web map

What would be an optimal way to add a layer to the web map by using the drag and drop option? Should the layer be saved to the db or their are other ways? This would be a JavaScript based application ...
1
vote
0answers
40 views

ESRI Javascript KMLLayer and CSVLayer

I have a map where I have a KMLLayer that defines a geographic boundary and a CSVLayer that defines points within that boundary. I do not want any infoWindow information popping up for the KMLLayer ...
2
votes
1answer
33 views

Is it possible to pass a JavaScript object to “Layers:”?

I am trying to use the GetFeatureInfo functionality of Openlayers v3. I am taking the layer name dynamically from the layerswitcher and trying to pass it into WMS like: var ...
1
vote
1answer
47 views

Getting Node.appendChild error with leaflet

I am trying to add a popup function to some polygons. I've been consulting a few different tutorials trying to work it out and I'm concerned that I am getting conflicting instructions. The map I have ...
1
vote
0answers
57 views

500 Internal Server Error:System.InvalidOperationException: Missing parameter: settlementlocationcode

Here I'm trying to bind the data from database to table for selected features within the user entered buffer distance. This is working for simple query, but it doesn't work for query using PostGIS ...
0
votes
0answers
40 views

how to stop the marker from dragging?

I'm making a form that reads data from a map and puts it in an input field to be inserted into a database. The latitude and longitude were taken perfectly and inserted as expected but my problem is ...