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)

2
votes
2answers
28 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 ...
1
vote
1answer
150 views

Openlayers filter strategy on wfs deactivate problem

I have a filter control which works nicely. However, when I try to reset/remove the filter, I don't get the original features back. The debugger shows my features array as still only being the reduced ...
1
vote
3answers
355 views

javascript function to search all OpenLayers vector features covering a pixel

I have an OpenLayers map that draws features in a vector layer. The features are selectable and have a popup on select. Unfortunately in a lot of cases the features overlap so it can be impossible to ...
1
vote
0answers
15 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 ...
1
vote
1answer
340 views

Using sql SELECT DISTINCT in Fusion Tables API

How do I go about using sql SELECT DISTINCT in fusion tables API?
2
votes
1answer
380 views

find inner bounds of a polygon in leaflet

How can I find the inner bounds of a polygon in leaflet? I a want to plot points randomly in polygoon but when I say Layer.getBounds() I get the bounds and I can still plot the markers ...
1
vote
1answer
17 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 ...
-1
votes
0answers
7 views

Google Maps JavaScript API scale Polygon keep aspect ratio

I drew a polygon on the map.now i want to re-size the polygon keeping the aspect ratio. i don't want to use google.maps.Rectangle. this is my code var pointsPoly = getPoints(); /* */ var ply = ...
0
votes
1answer
162 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", ...
1
vote
1answer
798 views

How can i use snapp point in when i use measurecontrol?

I have problem about measurecontrol . I can use measurecontrol and i can show length to use measure control . But my problem is that .i didnt use in snap because measurecontrol is a control not ...
2
votes
0answers
18 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
14 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 = [ ...
0
votes
1answer
17 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 ...
2
votes
1answer
220 views

Using Odyssey.js with Cartodb.js

I'm looking to use Odyssey to create an interactive introduction to various data layers on an interactive web map I've created using CartoDB.js. I'd like to have different data layers turned on / off ...
0
votes
1answer
222 views

How to submit data to modify feature using applyEdits of ArcGIS API for JavaScript?

I'm new to ArcGIS API. In a form, how can you submit data to modify a feature using applyEdits? No map is involved with this. I have a form that populates the editable data with javascript. When the ...
0
votes
0answers
11 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 ...
0
votes
1answer
33 views

Highlighting point using ArcGIS API for JavaScript?

How can I highlight a point using ArcGIS API for JavaScript? When I use the function of centerAndZoom, I also want to highlight this point.
1
vote
1answer
289 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
2answers
715 views

ArcGIS map service layer not loading properly

I'm at a total loss. My initial problem was an issue with the layer not loading at all when the page was set to the full extent, despite having changed the Min/Max Scale settings generously when ...
0
votes
0answers
14 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
9 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
2answers
1k views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
1
vote
1answer
18 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 selectors. Instead of manually adding each layer to a layer selector I would like to do it using the ...
3
votes
1answer
75 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 ...
1
vote
2answers
287 views

Javascript + ESRI + Dropdown menu with layers

Dear people of stackoverflow, I have a script that generates a basemap with a layer that I have put on top of it. I am trying to create a dropdown menu in which the user of my HTML5 page can select ...
16
votes
7answers
8k views

Pure JavaScript Library for Geometry Operations

Does anyone know of a pure JavaScript library for doing geometry operations such as buffer, union, intersects, etc? I want to play with doing these operations in the browser. It looks like ...
1
vote
0answers
22 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 ...
4
votes
1answer
235 views

How can I select a feature in Openlayers 3 by right click it?

I'm trying to selete / delete a feature by right click it on Openlayers 3. I know I have map events singleclick/click/dblclick and I also know I can use the ol.interaction.Select for delete. In ...
0
votes
1answer
21 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
21 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 ...
0
votes
2answers
150 views

Adding KML layers to ArcGIS JS API v4 (beta)?

I have been building a web application using ArcGIS JS API v4.0.Beta1. I am having difficulties finding out how to add KML layers to the scene. How do I add the KMLs? I have tried adding a new feature ...
1
vote
1answer
2k views

OpenLayers - Show a WMS Layer from GeoServer

I'm trying to acesses with OpenLayers code an example of the embedded GeoServer map (the map of tasmania), which acts as a local server on my machine. However, every time I open the .html, the map ...
3
votes
2answers
212 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. ...
1
vote
0answers
13 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
424 views

how to disable duplicate items in the legend for ArcGIS JavaScript API

I have a problem with duplicate items in the legend panel! Can anyone help me? This is my feature Layer with popup info: // Feature Layer var msFeatureLayer = new ...
0
votes
1answer
42 views

Having more than one Openlayers layer switcher associated to one map

I am developing an OpenLayers 3 web application were I would like to incorporate more than one Layer Tree alongside my map. I have this JSFiddle set up that it has a map with multiple layers and one ...
0
votes
1answer
1k views

OpenLayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal ...
2
votes
1answer
15k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function ...
2
votes
1answer
12k views

Zoom Change Event Listener with google maps api

I'm trying to create an event listener that turns off a google fusion layer once the map is zoomed in to a certain level. I'm pretty new to javascript and its google maps api, so any help is ...
2
votes
1answer
16 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
27 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
35 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 ...
8
votes
4answers
3k views

CORS issue ArcGIS 10.1 IIS (Cross Origin Resource Sharing)

I have ArcGIS 10.1 installed with the web adapter for IIS. I've added a config file to the root of IIS7 to enable Cross Origin Resource Sharing (CORS) as per this page. I've pushed the cors enabled ...
0
votes
1answer
377 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> ...
0
votes
1answer
358 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 ...
3
votes
2answers
459 views

Google Maps need to click twice to get marker click event to trigger

I have a google map that I am populating with real estate listings from a database. I have set it up to refresh the listings when the map is panned or zoomed. I am using the dragend & ...
0
votes
1answer
157 views

google.maps.InfoWindow is not working

If anyone encountered the same problem and come up with the solution please give me an idea if what's wrong with this code. The InfoWindow is not working when i click the map polygon. All parts ...
3
votes
1answer
185 views

How to create an exact tracking route from GPS data with animated icon?

Probably this is not purely GIS related question, its related to developing issues. I am just asking if there is any kind of suggestions from Gurus. I am building an tracking application where GPS ...
4
votes
2answers
173 views

tabbed popup window for Arcgis Javascript

Anyone know examples of a tabbed popup window for Arcgis for javascript, NOT an infowindow? If you could point me in the the right direction it would help.
1
vote
1answer
258 views

ArcGIS javascript API setDefinitionExpression returns wrong result set

New to GIS and ArcGIS. I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. ...