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)

2
votes
1answer
76 views

Mutually Exclusive Bootstrap Checkbox Switches as Layer Control

I have this JSFiddle with two checkboxes using Bootstrap Switch that changes the layer visibility in Leaflet. I would like them to be mutually exclusive, i.e neither of them can be on or off at the ...
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
2answers
284 views

Unable to serve Cesium Terrain files

I am trying to generate 3d Terrain. I am serving the terrain files at localhost:8081 Here is the Cesium Code var viewer = new Cesium.Viewer('cesiumContainer', { baseLayerPicker : false, ...
1
vote
1answer
51 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', ...
0
votes
0answers
125 views

Esri Javascript Point Clustering Map Size

I am using Esri Javascript API to display points on a map that are pulled from a json object. Everything is working great, although i seem to be having issues trying to figure out how to get the map ...
6
votes
2answers
544 views

about token based authentication security

I am reading the authenticated services with token. I understand that a user have to get a token to using arcgis services. Example: https://domain.com/arcgis/rest/services/myMap/MapServer is my ...
0
votes
0answers
74 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? ...
1
vote
0answers
47 views

turf.intersect of a turf.polygon and a turf.linestring?

With the JavaScript library turf, when I try to use turf.intersect(polygon, linestring)) I get the following error: ReferenceError: 'coords' is undefined at ...
0
votes
2answers
174 views

Leaflet TimeSlider not showing points correctly

I'm trying to add about 13 thousand points in a map using the TimeSlide plugin, but my points are not following a logical order of appearance. When I use the slider I get the dates in the box below in ...
1
vote
1answer
68 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 ...
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
28 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(); ...
0
votes
1answer
97 views

Do all open source web mapping platforms require programming? [closed]

I currently use a proprietary software product for my company's web mapping, however I am interested in seeing other products. I use QGIS and would like to to put my layers on the web for both ...
2
votes
3answers
2k views

How to determine intersection between geojson feature and given coordinates?

I'm overlaying a leaflet map with features of geojson, fetched with d3 and added as SVG elements to the DOM. My geojson contains too many features to render at once, so my goal is to add to the map ...
8
votes
2answers
9k views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
1
vote
0answers
50 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(); ...
1
vote
2answers
153 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 ...
2
votes
1answer
55 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
votes
1answer
26 views

Set Visibility Openlayers

If the name of my layer in openlayers is "olayer". And if i want to set its visibility to true. Then the simple code is olayer.setVisibility(true); But if i want to set the visibility by ...
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 ...
3
votes
1answer
135 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
114 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 ...
0
votes
0answers
32 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
3answers
175 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
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 ...
4
votes
4answers
3k views

How can I find closest point on a polygon from a point

I have a point that may be inside or outside of a polygon, I need to find the nearest point on the polygon boundary from the point. Point(x,y) may be inside or outside of the polygon, shortest ...
7
votes
4answers
2k views

tiny JS discretization library for choropleth representation

I would like to know if a tiny stat/discretization js library ready to use exists. I do know about the existence of jStat (which I may explore a little bit more thoroughly), and I know that mapfish ...
1
vote
1answer
36 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 ...
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 ...
0
votes
1answer
326 views

Bootstrap and Mapbox: Nav Bar layer selection

I am building an interactive mapping solution for my employer and have run into a bit of a hangup. I am working with bootstrap for the first time and cannot figure out how to link the dropdown list ...
0
votes
1answer
130 views

JSON String From VB.NET to Javascript over 100,000 characters

I have a string of properly formatted JSON from a VB.NET function that I am trying to pass to JavaScript where I can convert it into an OpenLayers vector layer. The string can be variable length, ...
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 ...
3
votes
0answers
37 views

Attachment editor esri duplicate files

I am using arcgis API's attachment editor var attachmentEditor = new AttachmentEditor({}, dom.byId("content")); attachmentEditor.startup(); featureLayer.on("click", function(evt) { ...
1
vote
3answers
417 views

ArcGIS Javascript API: Get Map Object from DIV

So I am currently writing an application using the ArcGIS JavaScript API, and I want to access the map object that is held inside of my div from a js module I have. I was thinking it would be a simple ...
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
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
113 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
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 ...
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 ...
0
votes
0answers
59 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 ...
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 ...
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
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 ...
0
votes
0answers
42 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 ...
3
votes
3answers
2k views

Select tolerance or snapping in OpenLayers 3?

I'm using openlayers 3 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 ...
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 ...
2
votes
2answers
42 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...) */ ...
1
vote
1answer
172 views

Click event doesn't work with with Google Maps

I'm trying to create a simple click event when I click on a list item on my page, a marker should be created on the google map in that page. But it does not happen. Is there some google maps API ...
0
votes
1answer
763 views

Transfer Data from Database to Leaflet POP UP

How do you show data from database to leaflet pop up? Here is my code in php select command <?php $db = new PDO('mysql:host=localhost;dbname=poi', 'root', ''); $sql = "SELECT ...