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
174 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
46 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
83 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
31 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
48 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
322 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
51 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
90 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
74 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
103 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
37 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
39 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
220 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
221 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
102 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
55 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
56 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
76 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
32 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
134 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
71 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 ...
-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 ...
0
votes
1answer
147 views

Openlayers 3 custom Polygon feature

I'm trying to create a custom Polygon style for my layer style. I receive some information about position, orientation and age for a number of objects and I want to represent those as zoom ...
0
votes
1answer
57 views

Leaflet zoom to polygon

I receive a polygon layer in Leaflet via ESRI REST. (similar to here ) I want to have a menu where I can zoom to specific polygons. (one button per polygon) How can I do that?
0
votes
2answers
140 views

Given a GeoJSON file how do I calculate the area of the embedded features?

We have a GeoJSON file that contains an array of features each with their associated geometry. How can I calculate the area of each feature? Are there any Java or Swift libraries to help me? Any ...
0
votes
1answer
77 views

Openlayers example not working with coordinates

Hey guys i was just playing around with openlayers 3, and i created THIS fiddle, take a look at the javascript initilization code below: var styles = [ 'Road', 'Aerial', ...
0
votes
0answers
21 views

Order of coordinates for extent parameter

I was just going through the documentation for openlayers 3.11 and came across the Tiles() , Now it accepts a lot of properties(opacity, preload , map ... etc) , but the one i am interested in is ...
1
vote
1answer
32 views

How to console.log the imagerySet of a layer?

I found this simple openlayers example online , the map initialization looks like below: var styles = [ 'Road', 'Aerial', 'AerialWithLabels', 'collinsBart', 'ordnanceSurvey' ]; var layers = ...
0
votes
0answers
11 views

Heatmap renderer geoprocess result?

I have a geoprocess that returns a featureset of points. from this i create a feature collection and from the collection i create a feature layer. when i try to attach a heatmap renderer to the layer ...
1
vote
1answer
560 views

How to add a bounding box to openlayers 3 map

I have build a simple map using openlayer 3 , have a look at the code below: JS code: var map; function init(){ map = new ol.Map({ target:'map', renderer:'canvas', view: ...
1
vote
0answers
24 views

How to add a image link to javascript [closed]

I have some problem with my script. I want to add my picture link. I save the picture link at some table in geoserver this is my script <div id='gambar'> <img ...
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, ...
1
vote
1answer
92 views

Removing measure label from OpenLayers 3 measure?

I have implemented the measure example available on the OpenLayers 3 site (http://openlayers.org/en/v3.11.2/examples/measure.html) and I am currently trying to include a clear button that will clear ...
0
votes
1answer
38 views

How to load tiles of a specific area in openlayers-3 using a bounding box [duplicate]

I have built a simple open-layers -3 map ,see below for code: HTML code: <div id='map'></div> CSS : #map{ width:100%; height:800px; } Openlayers map ...
1
vote
1answer
246 views

SQL Server Convert GeoJson format into SQL geometry/spatial data

I'm using javascript and Openlayers 3 and to draw shapes or geometry in osm map. The data is in geojson format and i want to store it in SQL server 2008 R2 using SQL geometry or spatial data types. ...
1
vote
1answer
25 views

Grab set of datapoints for each step for CartoDB torque timeSlider (through JavaScript)

So I have a regular CartoDB map that has a torque layer with a timeSlider. I know how to access the date for the slider object, but is there a way to access the datapoints for each step as it goes ...
2
votes
1answer
185 views

Zoom to GeoJSON point feature in leaflet

I'm relatively new to Web Mapping and trying to develop a litte Application with Angular JS and the angular-leaflet-directive. In this application I will work with a GeoJSON point layer representing ...
1
vote
2answers
61 views

Converting X and Y to lat/long using UTM WGS-1984 48N projection system

Hi I am using street directory api and it is using the UTM WGS-1984 48N projection system. I only need to convert static values! I am mostly using JavaScript but at the moment I'm alright with any ...
0
votes
0answers
11 views

StreetDirectory API: metricToGeo returns undefined

I am currently implementing the SD API and am trying to convert their x and y coordinates into lat and long. I only need the static values and this is how I implement it: <script ...
0
votes
0answers
32 views

How to use getElementsByTagNameNS (with IE support) for a OGC WFS xml response

I'am using getElementsByTagNameNS() to get values from within a tag in an XML response from a WFS service. I have simplified the process in the HTML/script below. The HTML/script works fine with ...
0
votes
0answers
44 views

Openlayers3 modify interaction: Restore last modified coordinate(rollback modify)

In a scenario, I am allowing user to modify inner polygon which is contained within external large polygon. And while modifying the inner polygon I am keeping the track of the modification by using ...
0
votes
3answers
104 views

Pass GeoJSON from .NET to Javascript

My .NET/OpenLayers/GeoServer/PostGres-PostGIS application allows users to create custom queries to get data from my PostGIS tables. The queries are called in .NET (not javascript) using a web method ...
1
vote
1answer
69 views

OpenLayers 2, GeoJSON cant get coordinates to work

I'm trying to display some Polygons on a map, and I'm new to OpenLayers, maps and GeoJSON. First what work: vector1 = new OpenLayers.Layer.Vector("GeoJSON1", { projection : "EPSG:4326", ...
2
votes
1answer
55 views

How to iterate through the attributes of a feature in Leaflet?

I receive polygons via the ESRI REST API with Leaflet. I want to iterate through all attributes of a feature in order to create a custom pop-up for it. My code looks like this: myLayer.on('click', ...
0
votes
0answers
236 views

How to highlight a feature while being processed in ol3

I have written the following code where I check the newly added line to a vector layer for the possible intersection with other lines in that layer. //vector2 layer is defined and added to the map ...
0
votes
1answer
47 views

CSVLayer: Unsupported query parameters

I have a CSVLayer with a number of features to display on top of my basemap. The layer is added to the basemap as follows: var map = new Map("map", {...}); var basemap = new ...
3
votes
0answers
64 views

Trilateration with error account or lack of precision

I am developing a node.js/javascript application where I would have dozens of beacons in a row (positions known), which gives me their distances to specific object (3 or 4 distances per object). The ...
0
votes
1answer
66 views

scripting getfeatureinfo for multiple wms layers

I am not really a programmer and I'm trying to create a webservice. I copy and pasted some script examples which made my script what it is now. I have multiple wms layers, but want to show different ...
1
vote
2answers
122 views

Where is the drawn feature when the drawend is triggered in OL3

I have written a piece of code to check if the drawn line is intersecting other lines in the vector layer. If so, then the line should be split and new lines should be added to the layer. here is my ...
0
votes
0answers
89 views

Highlight / Bounce marker on openlayers openstreet map and add hover

I have a page where i have a table at the bottom and a map on top of page. different table rows map to different markers on the map. I have a need to highlight a marker by doing something like ...