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
11 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
15 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
9 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
0answers
12 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
11 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
1answer
17 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 ...
1
vote
0answers
20 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
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 ...
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
18 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
12 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>'; ...
2
votes
1answer
64 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
15 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
22 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
32 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
28 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
16 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
11 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
45 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 ...
0
votes
0answers
29 views

ArcGIS map breaking in the web page

We are embedding the arcGIS map in to a web page in 1/8th part of the web page in right-hand side upper corner. We are using angularjs framework to develop this portal.We are are going to draw symbols ...
1
vote
1answer
29 views

OpenLayers 3 right click event

I am trying to listen to right mouse click , i tried "rightclick" as in documentation says , but it doesn't work. Can any one say why it doesn't work ??? map.on('rightclick', function (evt) { ...
1
vote
2answers
23 views

How do I add a radius line from the center of the circle to a point on the cricle

The following code adds a circle of given radius to the graphics layer on an ArcGIS map. How can i add a line that joins center of the circle to any point on the circle to the graphics layer. ...
0
votes
0answers
24 views

Having trouble to exportmap in OpenLayer3

I'm trying to export the map, but I'm always getting the same error: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. The funny is that It works the ...
0
votes
0answers
8 views

Selecting Option of Select Tag by click event using OpenLayers?

I have an OpenLayers map which several POIs in it. Now I want, that the user can click on the POIs which starts an event where it posts the pointFeatures into Input Fields of the HTML the most of ...
0
votes
1answer
55 views

How to filter polygons in Leaflet using range slider

I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out ...
0
votes
1answer
35 views

Node JS and Tilestrata to serve SRTM Tiles

Update (Aug. 16, 2015): I emailed one of the authors and it turns out that tilestrata-disk wasn't meant to be used as a "provider" in their system. No wonder! Here's what Brian Reavis said about how ...
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 ...
3
votes
1answer
27 views

mapbox - disabling viewing of unrendered white tiles outside of the map

I'm looking to disable being able to move the map in such a way that one can move outside of the map area: I don't want to be able to see the surrounding white areas when the map is dragged. I have ...
0
votes
1answer
17 views

cesium.camera.flyTo can't be called twice inside a <script> tag

Is cesium.camera.flyTo() function a deferred javascript function? I mean this function is executed only after <script> is parsed. So what if I have to call cesium.camera.flyTo() more than once ...
3
votes
0answers
18 views

Determine if point lies within shape?

What would the best method be for determining whether an address (geocoded to a lat/long point) lies within a given shape in a GIS shapefile. Best case scenario, we are given a boolean result, that we ...
0
votes
0answers
12 views

Openlayers Control.SelectFeature makes marker click listeners stop working?

I'm been having some trouble with openlayers. I have a map with several markers being added dynamically to a marker layer called markerLayer. Each marker has a click listener that opens a popup window ...
-2
votes
0answers
18 views

How to make a center of map?

I want to make a view of map with zoom=16 where the center is my location (geolocation). This is my code: var view = new ol.View({ ...
0
votes
0answers
19 views

redraw canvas when add new overlay?

Good day! A little problem: how to redraw canvas when I add overlay layer? Firstly load osm map, then creates canvas. So when I push the botton and add another layer it looks like sandwich and canvas ...
-1
votes
0answers
27 views

how to transform the projection

I Want to transform the coordinate system in this script. to get a right projection for geolocation. I want epsg 4326 for geolocation coordinate system var view = new ol.View({ ...
0
votes
0answers
17 views

style parameter from geoserver [duplicate]

I want to make a syle by taking field_1 parameters of geoserver this is the script var style_titik =( if (feature.get('field_6') === '4') {var b2 = new ol.style.Style({ image: new ...
1
vote
0answers
31 views

dynamic legend for tiles in Leaflet

Good day dear professionals! I have a little problem. I started to learn javascript and leaflet not so much time ago, and now I can work with layers, but creating controls that I need is to hard for ...
0
votes
2answers
33 views

Style a layer based on an attribute from geoserver in OpenLayer3

I want to take attribute from field_1 in geoserver to show at open layer 3 this is the script var style_titik =( if (feature.get('field_6') === '4') {var b2 = new ol.style.Style({ image: ...
0
votes
1answer
23 views

How to save a Polygon in an integrated Google Earth

I created a Polygon in Google Earth which is integrated in my Website. Now i have to get the KML File from this Polygon. Can anybody tell me how to do this?
0
votes
1answer
57 views

How to delete a feature in Openlayers 3.8.2 with `del` Key

I'm using OpenLayers-3.8.2 for developing a GIS application. Users draw some features and can modify all existing features on the map. They can delete features. I can delete feature as follow: user ...
0
votes
1answer
21 views

How to create folders when exporting OL to KML

I have this function that export all plotted features on my OpenLayers (2.6) map, by using the OpenLayers.Format.KML as follows: var featuresToExport = []; for (var i = 0; i < MAP.__layers.length; ...
0
votes
1answer
34 views

What causes the Leaflet JS Providers error; Uncaught Error: No value provided for variable {time}

I am using leaflet providers and attempting to add the NASAGIBS.ViirsEarthAtNight2012 to my layer control, my other basemaps load fine; but this one doesn't and returns the following errors in the ...
0
votes
2answers
25 views

Creating a Polygon by clicking on a website embedded Google Earth

I have to create a Polygon on Google Earth which is embedded in my website as it is made in the Google Earth application. I managed to create a polygon already but i can only create it with the ...
0
votes
1answer
36 views

Pre-load tiles in OpenLayers 3

I need to preload images (.png) / tiles in my own source: new ol.source.XYZ ,which can it run fast to move and zoom in mobile devices. I used ...libs/ol3/3.7.0/ol-debug.js and as urls: urlArray ...
0
votes
2answers
43 views

Set a new SLD style in openlayers 3 for WMS request

I im triyng to submit a SLD style in openlayers 3 to change the color of my WMS(geoserver) But nothing is working...Anybody have a idea? Here is my code: var wms_p_popf = new ol.layer.Tile({ ...
4
votes
1answer
106 views

Find Intersection of Two Circle given Lat/Lon and radius

I am attempting to calculate the intersection of two circle on the Earth with a given latitude, longitude and radius. I started with this post. These circle will never be more than 100 km in diameter ...
0
votes
1answer
61 views

OpenLayers 3.7 New Server Vector WFS with GeoServer

I have recently updated from OpenLayers 3.0 to 3.7 and I noticed in the 3.5 update the Vector API has changed, I tried to alter the code as per the bottom section of code but i am getting the error ...
1
vote
0answers
18 views

Leaflet Markercluster and Timeline in sync

So I have been trying to figure how to use the markercluster and timeline plug in in sync to show a temporal animation of points. As some of the point data overlaps a cluster is needed to be able to ...
0
votes
1answer
31 views

Dynamic Layer Name - Leaflet Layer Control

I would like to have the name of a layer used by Leaflets layer control feature come from a variable instead of a string and based on data from the layer. The example shown below uses the variable ...
1
vote
1answer
33 views

How to add a polygon in Google Earth on a Website

As it is said in the title i have to add a polygon in Google Earth which is integrated in a website. I managed to integrate Google Earth in the Website, so i can view the world but i can not use any ...