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
0answers
24 views

Mapbox JS get geojson and echo to a div

I have a mysql table with geo data (id, lat, lon, speed, ...). I am using this php to parse to geojson (json.php in my case): <?php header('Content-type: text/plain'); $username = "[user]"; $...
1
vote
1answer
40 views

Multiple Selection

I implemented a map with markers pointing to airports, and when I click on a marker the name of the airport appears in a field. (All date included in a GEOJson external file). I just have a last ...
-3
votes
0answers
22 views

Error de JavaSQgis en Qgis [duplicate]

Cuando intento cargar la imagen de Google en Qgis 2.2 Valmeria me sale este error "Esta página no pudo mostrar un elemento de Google Maps. Contacta al administrador del sitio. Si eres el ...
0
votes
1answer
98 views

OpenLayers Plugin error: Google [duplicate]

I've seen other related questions concerning this issue, but I can't figure it out. QGIS doesn't show me Google Layers from the OpenLayers Plugin, and the following message comes out: This page was ...
1
vote
2answers
53 views

Issue in loading external geojson file into leaflet map?

I want to load an external geojson file into leaflet map. I created a global variable (i.e. tracts) for json file and referenced this variable in the script file. But i receive an error message that ...
0
votes
1answer
42 views

OSMBuildings building:levels are not working

I am integrating Leaflet with OSMBuildings and i am using Classic 2.5D. Everything is working and it is showing 3D building on 2D Map, But The Building levels are not working (I am gone through this ...
3
votes
0answers
34 views

CartoDB.js/Leaflet map - how can I click between multipolygons cleanly?

Here's my map: https://jsfiddle.net/Sidders/4exf969e/3/ I want to apply a click and hover effect to the polygons. So a polygon/multipolygon highlights on hover, and is selected with one click. The ...
0
votes
1answer
23 views

Google Places search implementation

I have a Heron/Geoext/ExtJS map. I found a site with this function and I would like to implement it. So how can I use this function without their MapCentia.gc2 function? How can I rewrite it to use ...
0
votes
0answers
13 views

How to filter two layers from drop down menu cartodb.js?

I am very inexperienced with Javascript. I already have a script to query a table column to auto populate a drop down menu and query the polylines based on multiple selections as attached below. I ...
3
votes
1answer
82 views

Rotate geojson feature with Leaflet

I have a GeoJson feature that is rendered with leaflet and proj4(ESPG:31467). Now I want to rotate that feature so that it NW corner points to NE, e.g. 90 deg rotation. Is there a way to do this? Or ...
0
votes
0answers
29 views

How to add mutiple photos from flickr API on the popup of leaflet.js markers

I want to make a slider of photos on the popup of the markers by taking 5 photos for each location.I have a JSON of few locations of a city.The json has the name, latitude and longitude of the ...
0
votes
1answer
92 views

Error Multiple Define when loading base script

I have an existing google maps-driven project that I'm trying to rebuild using Esri's JS API. Whenever I add the script tags <script src="https://js.arcgis.com/4.0"></script> to my page, I ...
0
votes
0answers
49 views

Change feature coordinates during drawing in OpenLayers 3

I have code which creates draw interaction for polygon. var createDrawInteraction = function () { return new ol.interaction.Draw({ features: polygonFeatures, type: ...
0
votes
1answer
30 views

CartoDB: Trigger InfoWindow from inside another InfoWindow

Is there a easy way (maybe even generic solution) to trigger opening the InfoWindow of Marker 1 from inside the InfoWindow of Marker 0? The goal would be to «jump» from marker to marker right from ...
1
vote
0answers
68 views

Dynamic column header in datatable from json array?

I want to populate datatable with dynamic column header and column data,i can populate dynamic column data successfully,but i cant achieve dynamic column .. I am using json array. My code is <...
1
vote
1answer
21 views

Leaflet: Style function does not work for point layer

I'm new to Leaflet and I'm not very proficient in Javascript. I've been trying to create a map visualizing a point layer with custom markers but for some reason the marker style as a function just ...
0
votes
1answer
51 views

How to insert attributes into a WFS using OpenLayers?

So I have a web app that's running and is able to add points and lines to existing Postgis tables by getting data from Geoserver. I need the following one specific bit of functionality added: I want ...
0
votes
1answer
60 views

Create buffer around point with Turf

This code is not working and I don't know why? function getlatlong(b,d){ return b,d; } function buffer(feature){ var point = { type: 'Feature', geometry: { type: 'Point', ...
1
vote
0answers
10 views

ol.interaction.DragBox - aspect ratio

I want to be able to select a rectangular area of the map, but the selection must have a fixed aspect ratio. Let's assume 2:1 like this: I haven't found any ol.interaction.DragBox option to do this. ...
3
votes
1answer
58 views

How to Pass geojson array to datatable dyanamically using javascript

I want to pass one geojson file to dynamically created datatable using javascript,I am unable to identify column names in file.. I have tried this.. <body> <table id="example" class="...
0
votes
1answer
75 views

How to load 2 different WFS layers using OpenLayers?

I've been trying to load 2 WFS layers with the 3857 projection and I'm only able to load one of them, a line vector layer, while the other (point vector) doesn't load at all. Later I'm going to want ...
1
vote
2answers
53 views

Is there an editor for Leaflet JavaScript that has intellisense functionality?

Is there an editor for Leaflet JavaScript that has intellisense functionality? I've tried both Visual Studio 2015 and Visual Studio Code ... in 2015, if I type code like var geojsonlayer = L and ...
1
vote
1answer
22 views

Marker points don't fit with street (lack of accuracy while zoom)

I'm using open layers 3.x with google maps layer (cannot give you link, search "ol3 google maps layer"). I can't enhance the accuracy how points would be represented on map, see images below: This ...
0
votes
0answers
20 views

Taking Lat and Long data collected with Geolocation API and using it with ArcGIS Network Analyst?

I am creating a routing map that will eventually be hosted on ArcGIS online.(I am using JavaScript) Currently, I have figured out how to find someone's current location using the Geolocation API and ...
0
votes
0answers
26 views

Adding zoom capability to ESRI Story Map Map Tour

I'm building a Map Tour using ESRI's downloadable/configurable version. If you're unfamiliar with the layout, you have the option to sort through your map points using either a scroll bar along the ...
0
votes
1answer
43 views

Cannot get L.control.coordinate to work properly

I am trying to make a map modal with Leaflets that displays the lat./lng. coordinates in a box when the user clicks on the desired point. I got the popup given in the Leaflets tutorial to work fine ...
1
vote
1answer
54 views

Saving Edits on a WFS layer by using OpenLayers

So with an app that I've produced by taking this into account, I've managed to create a web map with editing function using a WFS layer from Geoserver. Problem is that, unlike in the working example, ...
0
votes
2answers
24 views

Leaflet: Change displayed column on click

I have a GeoJSON layer in a Leaflet map showing buildings. The columns of the buildings layer contain electricity usage info by date (eg., the column 12052015 contains electricity usage on Dec 5, 2015)...
0
votes
0answers
14 views

How to retrieve geodetic coordinates from a geotiff in Javascript?

I believe I have successfully calculated UV space coordinates by following this formula: var size = [image.getHeight(), image.getWidth()]; var xScale = directory....
1
vote
1answer
60 views

Editing WFS from GeoServer using OpenLayers

After reading a very good tutorial on how to edit WFS with OpenLayers, I've tried replicating it but with my own WFS layer from Geoserver. I managed to load the WFS and my basemap successfully and ...
0
votes
0answers
11 views

Loading TIN files in Javascript and converting to OBJ file

I am absolutely new to GIS/TIN files. I have to load a "Triangulated Irregular Network (TIN) file and render it. I am looking for javascript libraries that can load the file and convert it to .OBJ ...
0
votes
1answer
29 views

How to prevent adding/editing with AttachmentEditor?

I have a WAB (for developers, version 1.4, JS API 3.16) widget with an AttachmentEditor. Depending on the user's privileges (managed through MVC), I want to prevent some of the users from modifying ...
0
votes
1answer
53 views

Using WFS from Geoserver in OpenLayers

There are quite a few questions regarding the subject but the fact that these have so many views makes me think it's a much more complex subject that requires more attention. I've been through the ...
1
vote
0answers
52 views

Lag openlayer map when I add two layers

I'm writing a directive that controls openlayer3 map. The problem arises when I want to add two layers. For example KML layer and geojson layer. Map then does not work smoothly. You can only zoom but ...
0
votes
0answers
30 views

How To Get Results From Javascript / Google Maps API 3

First of all, I am desperate! My application that was working fine for years using Google Maps API 2 has failed. Evidently Google has stopped supporting it or changed something. My clients are not ...
0
votes
1answer
13 views

How to put image on top of OpenLayers 3 map by pixels

I need to put image which should be in middle top of openlayers 3 map. So, it should be defined with map canvas and pixels. Is that possible to do? This is my code: var arrow = new ol.layer.Image({ ...
0
votes
1answer
18 views

javascript .match to check for right coordinate format

I am using javascript .match to check and correct right coordinate format after user writes it in textbox. Working example: input: lat=57.000000, long=24.000000 code: match(/(\d{2}).(\d{4,9})/gi) ...
2
votes
0answers
41 views

Access Elements in SVG with Openlayers 3 using forEachFeatureAtPixel()

I am trying to access elements (id, style) of a SVG image in Openlayers 3. I tried to link different examples, but the problem is that displaying a SVG is only possible with ImageStatic() and the SVG ...
0
votes
1answer
20 views

Loading a stateGeoJSON across countries

I am trying to build a chloropleth map in Javascript with zoom functionality. Map will need to have a chloropleth layer of all countries. On zooming in it will need to show a chloropleth of the next ...
1
vote
1answer
42 views

How to add custom CSS class to leaflet tilelayer

I am working with mapbox.js and leaflet to create a map with a number of overlapping tilelayers. I want to apply some custom CSS to only selected tilelayers, and thus assign these layers to an ...
0
votes
0answers
29 views

Markers display with leaflet and javascript

I have a problem displaying data relating to schools on a div 'info' when click the marker with leaflet and javascript: here's the error: Uncaught TypeError: layer.setStyle is not a function
1
vote
1answer
48 views

PostGIS raster to UTFGrid

I am trying to create a UTFgrid JSON with a Raster in PostGIS. The goal is to provide weather data for web maps. I found some libraries: https://github.com/Ecotrust/create-utfgrids https://github....
2
votes
1answer
24 views

AttributeTable sending an alert that data was not found when clicking on table row

I have an AttributeTable that I have opening when I start a widget. When I click on a table row in this instance, I am able to get the information back correctly and not see this message. I did this ...
0
votes
2answers
67 views

How to get the distance between a point and a line in openlayers 3?

I've been working lately with openlayers 3 and trying to get a fully offline Mapping app, I am trying to get the smallest distance between a point and a line. I looked for a solution in the api and ...
3
votes
1answer
82 views

Leaflet printing does not show pins and map is shifted

I don't exactly why but whenever I try to print my leaflet map with layers, it shows the map a little shifted to the left as well as the pins are not quite ok. I tried using easyPrint() and window....
0
votes
0answers
34 views

Openlayers popup not working in IE11

In a js file in openlayers3, this code is not working for Internet Explorer. The problem is after popupLayers, is there a way to make this work in Explorer. var container = document.getElementById('...
0
votes
2answers
56 views

OpenLayers 3.15.1 - styleFunction is executed every time I move/change the map

I'm testing the new OpenLayers v3.15.1 and I've a simple question about styleFunction used to plot GeoJSON. My code contains: var vectorSource = new ol.source.Vector({ url: <my geoJson URL>...
1
vote
0answers
24 views

Non-HTML circle text labels on Leaflet map

I need to save image of Leaflet map with polygon, multi-polygons, circles and text below every circle. I have geojson file with circle and polygon coordinates (lat and lng). I managed to get image of ...
1
vote
0answers
39 views

Export features to pdf using JSPDF and Openlayers 3?

I built a map with different type of data, WMS layer, Vector Layers ( features extracted them from GeoJson file). Used Technologies : - Openlayers 3 - JSPDF How can i export just the selected ...
1
vote
0answers
37 views

Leaflet polyline not working

I'm trying to draw polyline to connect an array of waypoints. But I'm getting an empty div like this instead of a map with route. My code is this: <script> // set center ...