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
1answer
331 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
85 views

Multiple logical filters in a WFS request with OpenLayers 2.13.1

Is it possible, and if so how, to use multiple logical filters in a wfs request? For example I have a attribute, type_id that should be 1, 2 or 3. var wfsTypeFilters = [ new ...
0
votes
1answer
117 views

Open layer 3: Add a drop down select scale option.

In open layer 3.9.0 .I have default scale for open layer 3 but what user want is able to set the scale like 1:2000 or 1:5000 and so on using dropdown select box. something like the image below.
1
vote
0answers
52 views

Validate that Openlayers GeoJSON layer is in the correct format with OpenLayers.Protocol.HTTP call

I am completely new to JS and openlayers, i am trying to figure out a way to validate the received layer with the OpenLayers.Protocol.HTTP call. I want to validate that it is in the correct format ...
0
votes
0answers
107 views

ArcGIS Javascript API Search Widget Issue

I am having an issue with the ArcGIS JS Search Widget not returning ANY address results. I have configured it to search through my feature layers which works perfectly. But when I simply try to ...
0
votes
2answers
37 views

tag based filter in OpenLayers

I want to filter an OpenLayers(2) vector layer based on tags. Therefore, the vector layer has a property column which can be filled by comma-seperated tags like e.g. "culture,food,park", but also only ...
0
votes
0answers
105 views

Box zoom out in leaflet maps

I am using leaflet for creating maps in web and geoserver for serving maps as WMS layer.Leaflet has box zoom-in tool when we click shift and drag on the map. Similarly I need box zoom-out in ...
0
votes
1answer
203 views

switching the layers on/off in leaflet map layer tree based on styling

I am developing web application which has leaflet maps. I need the layer control which is similar to QGIS I am using Geoserver to get the layer as wms format and I added that layer using ...
1
vote
1answer
72 views

how to Zoom to max extent in openlayers3?

How to zoom to max extent on click of button in openlayers-3? I tried with function zoomtoextent(){ //map.zoomToMaxExtent(); if(globalbBox==null) { var bBox = new OpenLayers.Bounds( ...
0
votes
1answer
72 views

show kml from variable instead of url

I am trying to add a layer from KML variable instead of url due to the current circumstances that force me to. I am using openlayer 2.13.1, chrome, VS and .net. i have read the following link and ...
1
vote
1answer
97 views

Openlayer load kml 64 string data URI

I am trying to load a kml fileto google map using openlayer 2. below is the code: var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", ...
0
votes
1answer
62 views

Polygons on Mouseover event only Activate on Borders

I have a map with several polygons that have a mouseover and click event. The mouseover event causes the polygon to change color, and the click event brings up a custom info window. Most of the 200 ...
1
vote
2answers
170 views

Programmatically modifying ArcGIS Measurement object's units property

I am using ArcGIS's JS API for Measurement tool to measure and display Area, Distance, and Location points, but I cannot seem to be able to change the units programmatically. There's a method for ...
1
vote
1answer
165 views

Mapbox Directions Plugin - Get Route GeoJson

Goal: find the GeoJSON points in a web map that are closest to a directions route using turf.js. I am using the Mapbox Directions plugin. I am following this example. How do I work with the route ...
1
vote
2answers
85 views

OpenLayers 3 insert layer below other layers

I have this JSFiddle that can turn the OSM data on and off, the only issue being when it adds it back in the layer is added on top of everything else. I know this is a relatively simple fix using the ...
1
vote
2answers
164 views

Loading Json properties in a popup using leafletjs

I have a geojson file (tide_gauges.geojson) { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, ...
1
vote
1answer
98 views

Converting Esri Leaflet featureCollection to JSON?

I've followed the Esri Leaflet sample code found here: http://esri.github.io/esri-leaflet/api-reference/tasks/query.html //Querying features near a latlng var latlng = L.latLng(45.51, -122.70); var ...
2
votes
0answers
105 views

Populate list from arcgis server service in JQUERY javascript aplication instead of DOJO?

I would like to populate a list on a select combobox using jquery with data from an arcserver service.I'm wondering if this is possible and if so how i would implement it. I'm using the esri ...
1
vote
1answer
346 views

mapbox - how to generate a random coordinate inside a polygon

I've seen the leaflet plugin for mapbox which finds the polygon within which a specific point / coordinate lies, but how would I do the opposite - generate a random point / coordinate within a ...
1
vote
0answers
53 views

WMSGetFeatureInfo from two WMS layers with different parameters

I have a map with two layers, which can (and almost always do) overlap. These layers are WMS from GeoServer using SQL views (POSTGIS). They use the same query but with a different parameter. My hover ...
0
votes
0answers
122 views

Presenting specified country only based on latitude and longitude data passing by d3 user?

I am using d3/topojson and I'd like to color (or present) only two countries where two users are located.(The location of a user is represented by latitude and longitude.) I am modifying code from ...
1
vote
0answers
75 views

gdallocationinfo used in javascript with node-gdal?

I've been scratching my head for a white trying to figure it out if it's possible to get pixel information from my rasters using gdallocationinfo in javascript. I found node-gdal, but after reading ...
0
votes
1answer
44 views

Embedding a leaflet map onto a blog

I've created a leaflet map using maptiler. It's created a leaflet HTML file, which links to PNG images on my desktop and displays the image. How do I embed the map onto a blog such as tumblr?
0
votes
1answer
529 views

How to use leaflet-search for a geojson feature property?

I'm trying to use the leaflet-search plugin to search for a specific geojson property (i.e. 'Name'). The trick part of this is I want to perform a search on a Geojson file thats loaded in via the ...
1
vote
0answers
24 views

Geoprocessing in web worker

I would like to use a geoprocess using the esri js api from inside a web worker, can this be achieved? I didn't manage to pass the geoprocessor to the web worker because it seems that you can't pass ...
0
votes
0answers
126 views

Esri Javascript Point Clustering Map Size

I am using Esri Javascript API to display points on a map that are pulled from a json object. Everything is working great, although i seem to be having issues trying to figure out how to get the map ...
0
votes
1answer
211 views

Get GeoJson feature by ID and zoom on entity

I have got a leaflet map with Geojson layers : I use jquery Autocomplete to search an entity by name or id, I have no problem with that. I need your help because I'm not able to refer to a specific ...
0
votes
0answers
65 views

get all routes between two points

How can I see all the entire routes will be between two points in yandex map api ? drawRoute: function (targetX, targetY) { myLocation.then(function (loc) { ymaps.route([ ...
1
vote
0answers
90 views

Hide/filter features from Openlayers 3

Setup: OpenLayers 3 Description: I have a map and I need to draw GPS points (10000+) to the map points have extra attributes on them (id, datetime, name etc.). I also have to draw path between ...
2
votes
2answers
2k views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...
0
votes
1answer
235 views

OpenLayers 3 doesn't want to draw programmatically a polygon

I am using OpenLayers 3 and i am trying to draw a polygon using given coordinates , but it doesnt want to draw it . var source = new ol.source.Vector(); var ring = [ ...
2
votes
0answers
155 views

Has anyone implemented the leaflet.shapefile plugin?

I'm trying to implement the leaflet.shapefile plugin to enable a user to upload a zipped shapefile and overlay it on my webmapping site as can be done in the demo version of the site. ...
0
votes
0answers
66 views

Calculate maneuver details using coordinates

I want to calculate the maneuver details (turn-left, turn-right, etc) from the coordinates array returned by google roads API (I'm using JavaScript). I know maneuver details only returned by google ...
1
vote
2answers
301 views

Openlayers 3 cant delete feature

I am using OpenLayers 3. Here i found how to create and read drawn features. Now i am trying to delete a feature after i draw it on the map. I have tried several methods , but it doesn't want to ...
0
votes
0answers
160 views

How to add Marker to WMS layer coordinates?

I have this code in my html file <html> <head> <title>OpenLayers Example</title> <script src="http://openlayers.org/api/OpenLayers.js"></script> ...
0
votes
0answers
47 views

OpenLayers 3 catching moment before drawing and getting info

I am using OpenLayers 3 and got blocked. My goal is to draw different objects on map , the retrieve info about the created object. Using the documentation i found how to draw different elements , my ...
1
vote
1answer
76 views

Assigning OpenLayers Layers to different layer trees 'automatically'

I am developing an OpenLayers 3 web application were I would like to incorporate multiple layer trees. Instead of manually adding each layer to a layer tree I would like to do it using the method ...
1
vote
1answer
69 views

Shared edge between two geojson polygons

I am interested in getting the coordinates of a shared edge (if exists) between two geojson polygons. I am (currently) using turfjs and geojson-equality libraries I tried this but I consider it quite ...
0
votes
1answer
59 views

ArcGIS Portal homepage altered without html change

After changing the region in rest services the carousel of images has stopped rotating, the white banner at the top has disappeared and icons at the bottom have shifted. Seems like a page size setting ...
0
votes
1answer
53 views

Can I set a max zoom for a search in CartoDB.js

I made a map with a search box that is related to a country. Entering a postal code will zoom completly in to the asked postal code. I would like to center the map to this asked postal code, but not ...
2
votes
1answer
188 views

Cartodb add basemap switcher

I currently have a map created entirely in the CartoDB editor, including custom map. For some reason it doesn't allow you to add an attribution in the editor but thats a different problem. So my map ...
1
vote
0answers
90 views

How do you add a pop up to a Mapbox.js feature Layer

I am trying to get popups to work with a featureLayer in MapBox.js, to no avail. Here is my code: var pliOptions = '<h2>A ferry ride!<\/h2>' + '<p>Test Data<\/p>'; ...
3
votes
1answer
1k views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
2
votes
1answer
149 views

Leaflet polygon (multi polygon) to CQL equivelent

I am using leaflet with geoserver. I want to set up a CQL filter to do an intersect but having an issue with getting the geometry from leaflet polygon to cql polygon. For instance, the feature has ...
0
votes
0answers
142 views

Missing Leaflet icon with Html2canvas

I am using Html2canvas to capture images from a map viewer and Leaflet to add custom icon marker. The origin of the marker is at the top-left corner so when it is added to the map, the geographic ...
0
votes
0answers
71 views

Is there an open source API I can use to re-write javascript code for a web app that uses Esri's JS API?

Is there a way to "translate" Javascript code from a web app that depends on Esri's Javascript API into an Esri-independent web app? Also, can this be done if the app was built with Esri's Web App ...
0
votes
0answers
339 views

How to load GML to OL3?

I'm trying to load gml into openlayers3 there is the code: <html> <head> <title>Vector layer example</title> <link rel="stylesheet" href="ol3/ol.css" ...
0
votes
0answers
66 views

queryFeatures Error Timeout

I have the following scenario FeatureLayer.queryFeatures in javascript sometimes executes the query and sometimes gives Timeout exceeded. How to handle the problem? Any suggestion
0
votes
0answers
77 views

Drawing lineString in Google Earth API

I am able to draw a Polygon on the Google Earth API which is integrated in my website but i have to draw a lineString. Does anybody can help me? Here is the code i use to draw the polygon: function ...
0
votes
2answers
377 views

Leaflet MapBox addlayer

I'm newbie in coding and I'm trying to modify some downloaded GitHub code to make customized application and display my data. AddLayer function is making me desperate. I'm trying to add data from ...