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
0answers
58 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
21 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
95 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
8k 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
42 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
84 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
44 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
121 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
76 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
25 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
138 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
38 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
2k 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
33 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
56 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
302 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
123 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
43 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
30 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
390 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
26 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
49 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
69 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
51 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
31 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
44 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
15 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
37 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
20 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
39 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
35 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
39 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
34 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
114 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
745 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 ...
0
votes
1answer
55 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 = ...
0
votes
1answer
65 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
35 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 ...
3
votes
1answer
81 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 ...
1
vote
1answer
62 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 ...
4
votes
1answer
104 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 ...
3
votes
1answer
113 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 ...
2
votes
1answer
493 views

How to update data in Leaflet Control?

I have a Leaflet map with a control to switch between various basemaps or toggle on/off some overlay data. //Basemaps are all a-okay //Start with no polylines in my overlayData items = []; ...
17
votes
6answers
2k views

What embeddable web-based maps exist?

Some of the ones I'm familiar with (in no particular order): Google Maps (http://code.google.com/apis/maps/index.html) Bing Maps (http://www.microsoft.com/maps/developers/) Yahoo Maps ...
2
votes
4answers
237 views

Display two generated tiles on one map using Openlayers

i have a multiple Geo-referenced tiff I want to display Two TMS layer on one map. in another way i want to display tow tailed tiff image in the same map like the picture bellow using Openlayers ...