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
54 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
43 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
200 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
56 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
73 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
118 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 mouse-...
0
votes
2answers
88 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
117 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: js/gis/dijit/Search_SMILE.js:...
0
votes
1answer
127 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
29 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: true}...
0
votes
0answers
156 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
66 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
80 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
38 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(); ...
2
votes
0answers
86 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
283 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
69 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
20 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 ...
2
votes
3answers
322 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
53 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
211 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
212 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
59 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
40 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
295 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
143 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
64 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
56 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
43 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
45 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
70 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
345 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 http://leafletjs.com/examples/...
0
votes
0answers
73 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
18 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
379 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
25 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
45 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
36 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 temp=JSON.stringify(...
1
vote
1answer
66 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
84 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
60 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 ...
2
votes
2answers
59 views

Knowing if map has specific custom control in OpenLayers 3?

I created my own custom control for openlayers 3 as follows: window.app = window.app || {}; var app = window.app; /** * Control Creado para moverse por el mapa (quitar controles de dibujar...) */ ...
0
votes
1answer
160 views

Zoom to and Spiderfy MarkerClusterGroup, open popup of target marker

I am trying to zoom to a specific marker and open its popup using an external onclick event. To achieve this I need get the leaflet ID of the target marker, spiderfy the MarkerClusterGroup and call ...
5
votes
1answer
61 views

Attempting to map GeoJson file producing issues

I've been trying to get this to work for some time now. The end goal is to produce a map I can show using d3.js, however d3 is butchering the map and producing an undesirable image. The code is as ...
0
votes
1answer
112 views

How to remove or disable dragbox, dragzoom interactions in OpenLayers 3?

I am using the code to zoom the map by clicking and dragging on the map, but I want to remove this interaction when I press another button. How can I remove this? This is my code: var dragZoom = ...
3
votes
1answer
226 views

Extract geojson 'properties' dynamically with mapbox gl

I have an interactive map based on MapBox WebGL. I have an 'on click' function which is returning all information on data layers at that location (lovely). For each object I am trying to pull out ...
4
votes
1answer
267 views

D3: center a map feature using correct latitude and longitude, without rotation?

The following is a map of Chicago which I've created in D3.js, and the JS code to render it. I had a very hard time centering Chicago within my viewfinder (the white box). After much trial and error,...
1
vote
2answers
94 views

Set view does not work after Fitbounds

I have a map and a layergroup. var map = L.map('map').setView([27.6758,85.3313], 12); L.tileLayer('http://{s}.tile.cloudmade.com/8ae544230be74379927e6dee5d416398/997/256/{z}/{x}/{y}.png', {}).addTo(...
3
votes
1answer
175 views

qgis2web problem with lots of data

A few month ago I was able to make a polygon map of population: http://supermap.hostei.com Today I opened the same QGIS project and tried qgis2web again. The plugin interface had responding problems....
1
vote
1answer
97 views

Openlayers 3 - click under geolocation layer

I am using geolocation feature of Openlayers 3.13, as in the examples. (http://openlayers.org/en/v3.13.0/examples/geolocation.html) However I also have queryable point layers, and when I track the ...