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)

7
votes
3answers
1k views

Help needed using REGEXP for address string parsing

Using JavaScript, my aim is to create an "intelligent" address search function with a single textbox (rather than separate textboxes for house number, street name, street type, suburb, etc). I'm ...
2
votes
1answer
90 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 ...
0
votes
0answers
9 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 ...
1
vote
1answer
2k views

Adding drop-down menu on leaflet map instead of L.control

I have created a choropleth map including several layers from the same geojson layer which is turkeyData in my case.I actually did it and it works fine. But I like to change the standart leaflet ...
0
votes
1answer
35 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 ...
0
votes
0answers
17 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
25 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 ...
1
vote
1answer
42 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", ...
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 ...
3
votes
1answer
1k views

Setting options for individual layers within ArcGIS Server Map Service?

I've been working on an internet mapping site to include Esri basemap layers, and in-house map services broken out by layer. I am also still fairly new to javascript so this might be a javascript ...
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 ...
2
votes
2answers
330 views

Different results of fullscreen mode in OpenLayers 3

anyone here have already met similar problem like me? My original application is not viewing correctly (in all browsers) in fullscreen mode, which is openlayers 3 functionality. The problem is with ...
3
votes
2answers
683 views

Does leaflet support KML Ground Overlays?

I found an example showing KML overlays at http://harrywood.co.uk/maps/examples/leaflet/kml.html but it only plots vector layer using polygons. Is there any way to plot Ground overlays of KML (like ...
1
vote
2answers
70 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 ...
2
votes
1answer
32 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', ...
1
vote
1answer
261 views

Checking if point is inside area using OpenLayers?

I have a map and one point. I want create an area and check if a point is inside the area. map = new OpenLayers.Map("map"); map.addLayer(new OpenLayers.Layer.OSM()); var lonLat = new ...
1
vote
0answers
276 views

Want a transformation box after a user draws a polygon

I have built an application which allows users to draw a polygon inside another polygon. The two polygons are in different layers for some application specific reasons. After the user draws a polygon, ...
1
vote
0answers
63 views

Importing tif image from PostgreSQL Database to webpage

I am trying to import tif images from PostgreSQL Database to my website. In the website, I need to make a button control which will open the images. I think I have to use Python as a server side ...
3
votes
2answers
266 views

Geocode an address and then buffer

I have a script which geocode an address and buffer that address by 1, 5 and 10 mile radius. The problem I am having is that the address on the map shows 4 different points not sure what's causing it. ...
0
votes
0answers
51 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 ...
0
votes
1answer
75 views

How to add a bounding box filter to this leaflet WFS request?

I use this function to add an interactive layer to my leaflet application. It works great in most browsers, but fails due to time-out error on certain networks and browsers. The solution I think is to ...
1
vote
2answers
103 views

Why do my kml polygons move during zoom (using leaflet and meteor with OpenStreetMap)?

I'm using meteor.js and leaflet.js to build a simple application that displays kml polygons on an openstreetmaps layer. I can get the polygons to display fine, but during a zoom operation the polygons ...
0
votes
1answer
187 views

get and change style property openlayers

i need to change the property of some style after its created, and i need to change it with knowing only the string of the property name. i am getting string like "fillColor" and value like "blue", ...
2
votes
2answers
90 views

Leaflet Vector Layers Not Rendering During FlyTo Animation

In version 1.0 of Leaflet, when using the FlyTo function as per this JSFiddle, is it possible to force vectors to render/ draw as the animation is happening? My current issue is when using the ...
0
votes
1answer
47 views

Removing Google maps base layer from Google Maps API

I need to remove the base layer of google maps dynamically. User can add or remove the base layer.Because I am using more layer on top of it.Is there any function in google maps api to remove the ...
3
votes
2answers
1k views

select tolerance or snapping in OL3 (Openlayers 3)

I'm using openlayers3 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 ...
5
votes
1answer
769 views

Using download JavaScript code option of ArcGIS Online without getting basemap too?

I am trying to create a Web App, using the ArcGIS Online feature of downloading the javascript code, with the map id being used for connecting to the ArcGIS Online. I was able to do that successfully ...
8
votes
1answer
2k views

Adding custom basemap in ArcGIS.Com that can be used in Javascript API?

It's possible to add a layer as a basemap in ArcGIS.com by checking the check box use as baselayer: But when I consume the map using: var mapDeferred = esri.arcgis.utils.createMap("<guid>", ...
1
vote
1answer
1k views

Placing GeoServer WMS layer within OpenLayers 3

I have the following basic OpenLayers 3 code that opens a OSM background mapping and this works fine: <!doctype html> <html> <head> <title>Hello PMS</title> ...
2
votes
1answer
383 views

How do I use Proj4Leaflet projections correctly?

I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different ...
1
vote
0answers
83 views

Turf.js Check if polygon “Contains” another polygon

I am using turf.js for geometrical operation on openlayers3 features but i think it lacks support for "contains" operation. There are these within and inside operations, but they return "false" when ...
1
vote
1answer
84 views

CartoDB.js API geojson layer not rendering

I am working with the CartoDB.js API and have taken this example from Azavea. http://sandbox.azavea.com/cartodbvisualization/ There are a few declarations that I do not need, however conceptually my ...
0
votes
1answer
177 views

CartoDB json to HTML Table using Javascript or Jquery

I am trying to display the dataset inside the cartoDB as HTML table. When i give request to the postgre database by SQL API, it is returning as the format (json) below in the snapshot. I want the ...
8
votes
3answers
5k views

Z-index in OpenLayers 3: layer ordering in OL3

Is there a method to change Z-indexes of layers in OpenLayers3 like it was in old version? map.setLayerIndex(markers, 99); //set the marker layer to an arbitrarily high layer index I need to change ...
1
vote
1answer
561 views

How to add WMS Layer from Mapserver( localhost) on Cesium Globe?

I am trying to add WMS layer from mapserver i.e. from localhost on Cesium Globe with the following HTML code. But I am not able to load or connect Cesium with the Mapserver and nothing is displayed on ...
4
votes
1answer
88 views

GeoJSON Layer Order In Leaflet 0.7.5

I am developing a web application that brings in a number of tileLayers and geoJSON layers. For the tile layers I have been able to do similar to this JSFiddle in that the layers appear depening on ...
1
vote
1answer
135 views

Leaflet Marker Cluster: refreshCluster function issue

I am trying to use the markers.refreshClusters(); function to refresh the marker icons for a new styled icon I am trying to work with to highlight the selected cluster. Unfortunately, I keep getting ...
1
vote
1answer
322 views

Joining table data to features in QGIS?

I am trying to make a map using QGIS but I cannot join table data to features in QGIS. In ArcGIS for Desktop you just open the folder and then join the tabular table with the spatial data table. ...
1
vote
0answers
38 views

Route between two coordinate points via line

I tried to search for an answer but couldn't find any so I decided to ask. I would like to ask which would be the best way to get the shortest (and the only one) route between two points from a part ...
2
votes
1answer
41 views

Story Map SpyGlass without ArcGIS Online?

I am looking to see if there is an implementation example of the Spy Glass widget without ArcGIS Online or Story Maps. I have found the LayerSwipe documentation and can implement that fine, but I ...
0
votes
0answers
28 views

Temporal Heat Map using Leaflet and ESRI

I am trying to create a temporal heat map using this template: https://esri.github.io/esri-leaflet/examples/visualizing-time-with-feature-layer.html I would like to show the symbology based on a ...
1
vote
1answer
224 views

Openlayers 3 circles from geojson not working with layer tile source different from TileWMS

I am working with openlayers 3 with a layer from mapbox or openstreetmap and I need to draw some circles on it. I am able to print the circles with a view with a projection EPSG:4326, but then I have ...
0
votes
2answers
88 views

how can I specify a popup to show only for a specifc layer in openLayers 3?

I am using the function to define popup contents in a map, and right now, it createa a popup for every feature I click on the map, no matter what layer it is in. I would like this popup to appear only ...
1
vote
1answer
55 views

Unable to find all points in extent area using ArcGIS API for JavaScript?

I am trying to create a map where I can draw a selection area, and get info of all graphic pointers under it, I tried to modify ArcGis example but the problem now is that I can only able to select ...
1
vote
1answer
262 views

OpenLayers Drag&Drop a pin to select position?

Is there an OpenLayers example that allows the user to set a position with drag&drop. I would like to have a pin and set the position after the user drags & drops the pin to a new position.
1
vote
1answer
189 views

Leaflet Opacity Control Using Slider For Bootstrap

I am attempting to use the Slider For Bootstrap to update the opacity of a layer within Leaflet. The slider also needs to be in a Bootstrap Popup but this part is working. As per this JSFiddle you ...
1
vote
0answers
38 views

Making a ajax JSONP call to get the WFS features from Geoserver [closed]

I am Working on a GIS application. Technology working on Geoserver and Openlayers 3.5.0 for this application. I am not able to make a JSON request call to the WFS endpoint. If i make a JSON request, ...
2
votes
1answer
77 views

OpenLayers 3.10 - GetIndex / SetIndex

I am a complete beginner to OpenLayers and webmapping in general. I am trying to change the layers' order of my map by modifying the layers' index value, but I cannot get my code to work. Any hint ...
3
votes
0answers
108 views

Has API been written for SpatiaLite for Cordova?

I am creating an app in which I will be creating an AutoCAD model for a 3 floor building at my college. I'll be importing this model as a spatial object into my javascript app - then wrap it with ...
5
votes
1answer
969 views

OpenLayers 3 modify end event

I want to save the geometry data after I modify it, so I need an event that fire after I finish to modify the feature. I use the following from this post: listener modify interaction var ...