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

Toggling Leaflet Legends

Currently trying to use the following code to add and remove Legends as a result of an overlay being added to the map. Getting no error messages in browser but still doesn't seem to be working. ...
0
votes
1answer
31 views

Use QuadTree for better complexity on search features

I want to improve the complexity of search specific feature when using this function : map.forEachFeatureAtPixel(e.pixel, function (feature, layer) { // Do something.. }); The improvment ...
0
votes
0answers
29 views

Loading local tiles OpenLayers

Theses days i load local tiles, chrome doesn't go so well with letting you loading local tiles , because of secuirty problem as CORS etc.. but there is a way to cross this problem and let chrome ...
0
votes
1answer
39 views

Custom Leaflet Legend

Trying to create 9 separate leaflet legend variables for the 9 different overlays (graduated colour chloropleths) I have on a leaflet map. Each overlay will have 6 classifications of colour dependant ...
0
votes
0answers
24 views

Which library map better for my use [duplicate]

I will be start by saying that for couple of weeks i have been looking for a good map library that will serve my desires well,so i started to find the "best" one. First of all my main desire is to ...
0
votes
1answer
50 views

Using OpenLayers 3 Feature onclick event?

I looked for a way to fire onclick event and I found Adding event handler to feature in OpenLayers 3? at Stack Overflow. I undestand from this question is that there is no event onclick to features. ...
1
vote
2answers
53 views

Appending Data to FeatureLayer in ArcGIS API for JavaScript?

I am working on a web app where I am making calls to a database api and it returns a JSON Object. I've managed to do so successfully as well as any manipulations that need be done. Is there a way to ...
1
vote
1answer
50 views

why doesn't show feature on map

this is fiddle Link.Feature doesn't show on map when it has been like this code : var featureVectorLayer = new ol.layer.Vector({ source: featureClusterSource, style: new ol.style.Style({ ...
3
votes
1answer
39 views

OpenLayers creating Marker Vector Layer

I have seen over the internet a lot of examples of using Features paste them into the Vector layer and after that insert the layer to the map . basic example: <script> var iconFeature = ...
0
votes
1answer
32 views

Pushing value from text input to search widget in ArcGIS API for JavaScript?

I am developing a surveying app that among other things, asks the user for their address/closest street intersection, and then later asks them add features around they're "neighborhood". I would ...
0
votes
1answer
36 views

OpenLayers 3 how to get only the modified feature?

I have a problem with OL3 and it's ol.interaction.Modify Event. Whenever I modify a feature, just one, it returns all features inside the layer. Currently I have 77 features (polygons) and I can ...
0
votes
1answer
31 views

Timing external javascript with ArcGIS Online embedded map

I have an ArcGIS Online time-enabled map on a webpage. When the map loads, the time slider begins moving. I would like to have a chart that moves along with the time slider, but I don't think ESRI has ...
0
votes
1answer
28 views

Loading Scene from ID into ArcGIS JavaScript API 4 Beta: “SyntaxError: Unexpected token ILLEGAL”

I have created a city engine web scene,and I am trying to display the 3d-visualisation view on sceneview by using the portal Item Id of my webscene. But I am getting "SyntaxError: Unexpected token ...
0
votes
0answers
57 views

JavaScript API Local Install not working

I have installed the JavaScript API locally to use in a developer environment with no internet connection. The issue I am encountering is when I attempt to view the sample service hosted by ArcServer ...
1
vote
1answer
61 views

Cesium JS Line Length

Is there a method to return the length of a Cesium JS polyline, in real-world units? For example, if I create a polyline: var orangeOutlined = viewer.entities.add({ name : 'Orange line with ...
2
votes
1answer
18 views

Is there an app/plugin combination that suits the tracking of a public bus

In a town near where I live there is a public bus that runs a circuit about once an hour. I was asked if it would be easy to track the bus (presumably via an android device on the bus) and put the ...
0
votes
1answer
27 views

Selected Feature not highlighted in map of CMV (Configurable Map viewer)

I have copied the whole code of Find widget and added it into another widget. First widget is working fine and highlighting the feature(creating feature from geometry), second widget is also working ...
3
votes
2answers
60 views

Move leaflet polygon to given position

I have a circle and a polygon that I'd like to move to the user's local position. I managed to move the circle latLng but I can't find a way to do the same thing with a polygon. Can someone help me ...
0
votes
1answer
27 views

OpenLayers line string not displaying

I am trying to show a line on map using Open Layers 3. Here is my code so far: <script type="text/javascript"> var map = new ol.Map({ target: 'map', layers: [ ...
1
vote
0answers
23 views

WebMapping Charts Overlap Issue LeafletJS

I am a beginner in webmapping development using LeafletJS and JS. I am the owner of the website built under LeafletJS. I have faced some problems with charts overlapping. On the right top of the map ...
0
votes
0answers
44 views

leaflet+canvg= leaflet svg elements on canvas

I want to create png file from leaflet map. I use html2canvas library, and leaflet map tiles and other elements convert to png great, but not svg-elements(offsets). I know, that there is some code to ...
0
votes
1answer
33 views

Adding Network Analyst widget in Configurable Map Viewer (CMV)

I need to add a widget in Configurable Map Viewer (CMV), which will return me the nearest facility of parcel number entered in the box. Which is to be done by Network Analyst in ArcMap and i have ...
1
vote
1answer
49 views

D3 - Loading data from JSON doesn't work

I'm starting to learn D3 and it seems like a powerful framework. I'm trying load the data from json. I can see data but nothing happen after loading data into D3 library. There are no error messages ...
1
vote
1answer
25 views

Openlayers 3 - Create symbol like openlayers 2 -> OpenLayers.Renderer.symbol.anySymbol

In the Openlayers v2 I could add symbols like: OpenLayers.Renderer.symbol.pointToIcon = [100, 70, 20, 50, 42, 70, 20, 90]; How can I do it with Openlayers 3 ? In the openlayers 3 I can use this ...
2
votes
1answer
38 views

Map scale factor when converting from Mercator to Equirectangular

Lets say I have a map in Mercator projection, and I know top and bottom latitudes: topLatitude = 80; bottomLatitude = -55; I also know width and height of a map: width = 800; height = 500; I want ...
0
votes
1answer
37 views

Get JSON WebMap from ArcGIS JavaScript API Map object [duplicate]

I'm trying to get a WebMap object (as JSON) from a JavaScript Map object in the ArcGIS JavaScript API. Is there any way to do this within the API, without using ArcGIS.com? Ideally something like: ...
0
votes
0answers
34 views

Converting circular structure to JSON error

I am trying to create a feature service from a feature collection. Prior to that, a query was performed and a featureSet was produced. However, I get the circular json error when I try to create a ...
0
votes
0answers
17 views

how to know which marker clicked

I have many markers on my mapbox map. And how to know which marker is clicked. Here is my code function zoomToFeature(e) { console.log(e); } function onEachFeature(feature, layer) { if ...
1
vote
1answer
29 views

How to force EXT JS - GeoEXT to show legends with OpenLayers?

My sld is applying as below function cusMap(strSld_body,talukaName,name){ console.log(strSld_body); var query = new OpenLayers.Layer.WMS.Post(name, geoServerURL, { LAYERS : ...
1
vote
1answer
83 views

TypeError: jsonFeatures.map is not a function using fuse-search in leaflet js

Trying to implement the fuse-search functionality in a leaflet map, however I am getting a TypeError: jsonFeatures.map is not a function. Here is my javascript part of the code: var map = ...
0
votes
1answer
28 views

SLD applying not working in openlayers

My sld is not applying function cusMap(strSld_body,talukaName,name){ console.log(strSld_body); var query = new OpenLayers.Layer.WMS.Post(name, geoServerURL, { LAYERS : ...
1
vote
1answer
32 views

Leaflet fitBounds Starting Position

I am creating a Leaflet application that uses the code from the Simple CSV template to set the bounds of the map to the selected markers. The issue I have is that I want to set a start position that ...
3
votes
1answer
19 views

Handle Multiple Layer Max Zoom Levels in Leaflet

Along with Mapbox layers, we are also adding layers from WMS and ArcGIS servers hosted by our customers to display map data relevant to them. Is there any way to figure out what the max zoom for a ...
0
votes
1answer
39 views

Different colors in the same layer

I have an app that is consuming ArcGIS REST Services through the ArcGIS JavaScript API (10.2 or 10.3). One of the available layers contains several Polylines. These lines belong to different groups, ...
1
vote
1answer
117 views

Export PDF from OpenLayers map with jsPDF

I try to use javascript library JSPDF for export my OpenLayers map but it doesn't work. I create my HTML : <head> <script type="text/javascript" ...
0
votes
1answer
39 views

add text layer in openlayers

I have a text file that contains longitude and latitude of some items. How can i load this file onto a map? <script src="http://openlayers.org/en/v3.0.0/build/ol.js" ...
0
votes
1answer
60 views

OL3 reproject geoJSON in EPSG:4326

qgis2web is a plugin for QGIS which creates webmaps. This question is about its OpenLayers 3 export. It exports QGIS layers to geoJSON to pull into the OL3 map. It writes them in EPSG:4326, as I ...
2
votes
1answer
47 views

OpenLayers 3 with geoJSON - struggling with projections

I am trying to implement support for multiple projections in qgis2web. I believe that the correct approach would be to export the QGIS layers to EPSG:4326 geoJSON. I've implemented that. However, I ...
0
votes
0answers
66 views

Plotting points with ArcGIS API for JavaScript

I have set some latitude & longitude values that I would like to show on my heated map using "Esri/geometry/Multipoint". I have specified some json data in a variable called mpJson that I would ...
0
votes
0answers
27 views

Pivoting around Geojson variable symbology in Leaflet Map

I currently have geoJson loaded in to a leaflet map where I want to change the variable symbolised. The symbology rules can all be the same for each variable visualised. I need to find a way of ...
0
votes
1answer
30 views

Conflicting layer styles for geojson in Leaflet map

Assigning a style to a geojson layer but it is visualising with the aforementioned style as well as the default blue style assigned to geojsons. Can't work out what is causing <!DOCTYPE ...
0
votes
1answer
67 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
2answers
78 views

Toggle geojson labels using control with leaflet

I am attempting to create my first leaflet map. I am using OpenStreetMap tiles and adding geojson features as overlay layers. I have been following tutorials with much success, until I started trying ...
0
votes
0answers
52 views

Google maps not being displayed inside my widget

I am trying to display my data in google maps. Like if i drag and drop my data, a widget should opens and it should display the data in the google maps inside the widget.Now, widget is opening, but ...
0
votes
1answer
35 views

Leaflet geoCSV Popup Customisation

I am currently using the leaflet geoCSV plugin to bring through CSV data into the map frame. I am struggling to be able to customise the popup to only show certain attributes of the CSV and different ...
3
votes
1answer
39 views

Leaflet geojson styling leaves gaps between polygon

I'm styling a geojson polygon composed of multiple closely placed vertical segements which doesnot have a gap in between (i've checked the topology). I want to display just the fill and without ...
2
votes
1answer
46 views

Ol3 Boundless - layer selector placement

I recently started playing around with ol3 + boundless. I created the edit application using > suite-sdk create myApp ol3edit. I am trying to move the layer view/selector from the map to a ...
0
votes
0answers
19 views

Loading tiles of EXTENT in OpenLayers locally (localStorage)?

I have created a simple openlayers 3 map HERE , the map initialization code looks like so: var styles = [ 'Road', 'Aerial', 'AerialWithLabels', 'collinsBart', 'ordnanceSurvey']; ...
0
votes
1answer
73 views

CartoDB layer not showing up on over mapbox layer but legend is

Currently, the legend is only displaying but not the layer. NOTE: I am trying to run the web map on a bootstrap modal, hence you will see: $('#webmap-modal').on('shown.bs.modal', function() in the ...
2
votes
1answer
46 views

Is it possible to show Leaflet Marker Cluster with JSON API?

I have a problem with displaying Leaflet Marker Cluster working with Leaflet-layerJSON. There are markers, but I cannot show the clusters. This works with GeoJSON, but now I have different data ...