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)

1
vote
1answer
290 views

problem with popup conclusion on pressing a marker

I have markers on pressing to which popup has to be brought. how to make it? (coordinates of markers undertake from a DB) var map; var markers; function ejecutar() { init(3); ...
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 ...
2
votes
1answer
26 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
0answers
11 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
17 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 ...
-2
votes
0answers
16 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
15 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
1answer
19 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
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 ...
2
votes
1answer
540 views

Openlayers text layer is not working

I am trying to load markers from a text file using openlayers text layer, but no marker is shown, text file and icons are in same directory. However I am able to show markers using marker layer. My ...
2
votes
1answer
535 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
0
votes
2answers
31 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
22 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?
1
vote
1answer
253 views

Why do I have to reload the page, to show the Map correctly?

I added a map, in the way I'm supposed to, but why do I have to reload/refresh the page, to get the map (almost) as I want to? This is, what I mean: Map before reloading the page: Map after ...
1
vote
0answers
28 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
1answer
54 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
224 views

Openlayers event cluster feature id does not appear on layer vector feature id list

My application's objective is to click on a cluster and produce a popup with a list of all placemarks clustered there where every entry is a hyperlink that closes current popup and opens a new ...
0
votes
1answer
161 views

Configurable map viewer (CMV) - Find the area of drawn polygon

I am trying to get the area of a polygon and divide that by 16.94 ft^2. I have plugged in a Template I found. I am missing something. I am trying to get the template and my original code to talk. ...
4
votes
1answer
314 views

Sketch event in Openlayers 3 drawing interaction

For drawing Polygon in OpenLayers 2 we could use as follow: function drawEnd(){ ... } function putPoint(){ ... } function sketchModified(){ ... } function cancel(){ ... } var ...
0
votes
1answer
25 views

zoomin and zoomout in google maps

I am creating javascript web application using google maps. i am trying to create a tool for zoomin and zoomout option.i created two buttons for zoomin and zoomout, now i am trying to activate the ...
1
vote
3answers
350 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 ...
2
votes
2answers
1k views

How to create circular polygon in openlayers 3?

So i would really like to modify this example: http://openlayers.org/en/v3.0.0/examples/tissot.html?q=circle Problem there is that wheter i try to apply it to my map it doesen`t work, probably ...
1
vote
1answer
147 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
1answer
441 views

How can I dynamically restrict pan extents on an image layer in OpenLayers 3?

I have been sandboxing with OpenLayers 3 and thus far have been happy with the results. I have used answers on this site to restrict my most zoomed out level from panning and to restrict the range of ...
0
votes
1answer
30 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
24 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
304 views

Drawing graphic layer on client side with ArcGIS API for JavaScript?

I'm using ArcGIS API for JavaScript 2.8. I have some problems with drawing graphics point on client side. The problem is, when I draw points by first time by JS api everything is OK. But when points ...
2
votes
1answer
214 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
137 views

GeoJson and D3.js multipolygon

I have this geometric shape file, so no map of a city. I store the two Shapefiles in a GIS database as a geometric form. Now, I want to visualize the geojson data. I created the GeoJson data ...
1
vote
1answer
657 views

refresh the map Ol3 (Openlayers3)

Hello I'm using ol3 in a mobile hybrid application using sencha touch2 , so I start by drawing a polygon inside a map , after validating this drawing I redirect the user to an other form in order ...
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 ...
6
votes
1answer
480 views

Why do ArcGIS Desktop 10 HTML popups give JavaScript/HTML Error?

Using ArcMap 10 Desktop HTML Popups. The issue I am having is that the html < select > elements aren't working - you can select it and use the arrow keys to navigate through(up/down) the list but ...
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 ...
138
votes
18answers
53k views

How do various JavaScript mapping libraries compare? [on hold]

I am working on a web-based mapping system and I'm trying to figure out the best/most appropriate library to use. There are a few of them about and they each have pros and cons. Even after trying a ...
1
vote
1answer
705 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
2answers
37 views

3D equivalent to ArcGIS API?

I am currently working on a 3D mapping project. And I have created some KML files from ArcGIS Online, and I have edited them in Google Earth to adjust the 3D attributes. I am also designing a webpage ...
1
vote
1answer
790 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 ...
1
vote
1answer
337 views

Using sql SELECT DISTINCT in Fusion Tables API

How do I go about using sql SELECT DISTINCT in fusion tables API?
0
votes
1answer
58 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
1answer
278 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 ...
0
votes
2answers
39 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({ ...
1
vote
0answers
17 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
29 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 ...
2
votes
2answers
493 views

Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for ...
2
votes
1answer
363 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
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 ...
1
vote
2answers
56 views

Leaflet map on click ignore layers

Leaflet has a 'click' event: map.on('click', function(e) { alert(e.latlng); }); This does not appear to work when map layers are displayed on the area clicked. Is there a way to use ...
0
votes
0answers
22 views

Openlayers 3 draws over other icons

I am using Openlayers 3. I made an html file witch opens map of a country in offline mode. It enables the user to draw images/segments and polygons on it. My problem is when I change the image I want ...
0
votes
1answer
160 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", ...