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
108 views

3D OSM buildings seems to be floating and shifted after adding terrain effect in Cesium

I had made a 3D view of the osm buildings using cesium. In which i had added a terrain effect using the standard cesium terrain provider as below var viewer = new Cesium.Viewer('cesiumContainer'); ...
0
votes
1answer
434 views

Leaflet: Scroll wheel controlling map zoom and not drop down menu

Edited 6/19/2015 I have a custom leaflet control box with a drop down menu. When I use the scroll wheel over the menu, the map changes zoom level instead of scrolling the menu. The problem occurs ...
1
vote
1answer
339 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
1answer
265 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 ...
1
vote
0answers
27 views

OpenLayers misinterpreting Lat/Long

I am currently plotting points on a Open Street Map and using the Lat and Long of a point I know of seems to yield different positions on Google Maps and Open Street Map. //The standard for lat/long ...
3
votes
2answers
3k 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
116 views

WFS from geosever very slow to load in openLayers3

I originally posted this question about trying to load a geoJSON with openLayers3: geojson very slow to load in openLayers3. Based on a suggestion given in the post I'm now loading the layer in as a ...
0
votes
1answer
236 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
193 views

Is there any Map event fired when map is loaded completely when we device is oriented from portrait to landscape mode?

We are using ESRI ArcGIS JavaScript API in one of our Mobile web app. When map is loaded first time, Onload event is fired. But when we change orientation from Portrait to Landscape, OnLoad event does ...
2
votes
1answer
21 views

Exclude empty variables from OpenLayers 3 popup window

I have a map displaying multiple locations loaded from a JSON file. The locations are contained in a MySQL database along with various variables for each location including whether or not the location ...
3
votes
1answer
546 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 ...
3
votes
2answers
483 views

Openlayers map WMS stretched by latitude

I am working on a small javascript application for displaying map with WMS layers from 2 servers. The problem is, that image is stretched by latitude, it is wider, as it should be. This is is how it ...
1
vote
2answers
18 views

How to exclude parts of route based on street features?

I have a task. I have a route (coming from whatever, I am using Google Maps for now, but I can switch to OSM), and I want to exclude some parts of this route based on street features (like I don't ...
1
vote
0answers
24 views

Display a layer stored in GeoServer with Leaflet

I wanted to display a layer stored in geoserver with leaflet, I used this code but it's not working. var map = L.map('map').setView([4.477411, 21.309284], 3); ...
0
votes
0answers
8 views

Pop up for features inside a GeoJson File

I uploaded a GeoJson file into GMaps API that has many polygon features in it, and now I'd like to create a pop up for each polygon. The content will be obtained from the attribute table of the ...
1
vote
0answers
21 views

Leaflet javascript in popup

Can JavaScript be included in a leaflet popup? We have modified this example To this :- var this_marker = L.marker([51.5, -0.09]).addTo(mymap).bindPopup( '<div style="color: ...
1
vote
1answer
738 views

OpenLayers 3 how to keep original image extent

I'm new at ol3, I'm trying to display my GIS view by updating my ol2 code. I created the projection and I can display my static image but I'm obliged to use local extent [0, 0, 1024, 968] instead of ...
0
votes
1answer
42 views

OpenLayers 3 opacity overlapping

I've got some issues with OpenLayers 3 when displaying a Vector layer with opacity. The more I pan or zoom in the map, and the less transparency there is on the features. I think this comes from the ...
2
votes
1answer
38 views

Adding labels in cesium

I tried adding labels to my cesium application using the below code var entities3 = dataSource3.entities.values; var colorHash = {}; for (var i = 0; i < entities3.length; i++) { ...
1
vote
1answer
12 views

Viewing the data without any background imagery in Cesium

Is there a way to completely disable the background imagery in cesium? I would like to see only my data without any background imagery. Is this possible?
4
votes
3answers
71 views

Open layer 3: Need help in print tool

I am developing an print map function in ol3 application it includes some functionality such as if its polygon then area of that polygon will be display OR if its line length will be display. At ...
0
votes
1answer
65 views

How to use offline routing Dijkstra in javascript?

I am using a Openlayers 3 to create a Hybrid mapping app and among the constraints it must be for offline use, I have a road network in a geojson file and I need to get the shortest path from the ...
1
vote
1answer
14 views

mapbox with markers and checkboxes - disable all from showing on initial load

I have a page I built to display wind direction/velocity in various locations along a bike trail: http://microflush.org/cgi-bin/pathInfo.cgi I have several markers in a legend, with check boxes to ...
0
votes
0answers
43 views

OpenLayers 3 - popup auto pan

I created a simple OpenLayers3 map with the plugin Qgis2web. It consists of a basemap with points. Every point has its own popup. This is the html code for the map and for the popup. <div ...
2
votes
1answer
23k 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 ...
1
vote
1answer
466 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
1answer
52 views

Add Legend to Leaflet Map

I have a leaflet map that consists of various wms layers representing different years. I am trying to add a legend to my leaflet map but with my own custom hex colours instead of trying to use a ...
1
vote
1answer
223 views

ArcGIS JavaScript Web Application: Workflow for Tokens?

This may appear to be a duplicate but I can't find any online source which is able to help me. Essentially, I want to protect a web Service from unauthorized access but still need to allow a web ...
1
vote
0answers
16 views

Function access to surrounding object's variable

var CreateFeature = OpenLayers.Class(OpenLayers.Control, { clazz : "xyz", set_item : function(e) { var position = map.getLonLatFromPixel(e.xy); var latitude = ...
1
vote
1answer
28 views

White tiles with Google Chrome and OpenLayers 3 [closed]

I created personal tiles on my webserver, which works with Apache. These tiles are in folders from 0 to 16 in Jpg format. I render these local tiles with OL3.15.1. On Firefox, IE Edge and IE10 I've no ...
6
votes
1answer
535 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 ...
1
vote
1answer
220 views

way in R or Python to add image/video in map plot marker click popup/infowindow

I have many different (lat,long data) points of world associated with unique place names and corresponding each point specific image or video data. Now I want to create an html file where if user ...
1
vote
1answer
20 views

Catch WMS empty answers with OpenLayers 3

I was wondering if there is a way with OpenLayers 3 to catch problems with WMS layers, such as the service not answering, or not sending any images/tiles. So that in case of errors with a distant WMS ...
0
votes
2answers
186 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
32 views

hide and show a feature from group feature with checkbox in leaflet

To begin I will explain the code, I have a checkbox generated after loading the web page by the next code var CPID = new L.GeoJSON(false, { onEachFeature: function (feature, my_Layer) ...
0
votes
1answer
2k views

toggle visibility of a Layer in Openlayers 3(!) with a Checkbox

I have some vector layers on top of a tiled layer and a checkbox for each vector layer. I want a layer to be visible if it's checkbox is checked and vanish if it gets unchecked. I tried to call a ...
1
vote
2answers
2k views

OpenLayers-3 setting zoom so layers fit in map window

Is there a way to dynamically set the zoom level so that the current layers always fit within the width of the map frame on page load? Currently the zoom level is set statically such that when using ...
2
votes
1answer
50 views

Using JQueryUI Slider to change Layer Display (Leaflet)?

Can't seem to figure out how to use JQueryUI Slider to change the layer display on my leaflet map. Scenario is basically, When user slides bar across a dfferent layer shows up on the map (in years) ...
0
votes
1answer
193 views

Selecting features by attribute in Leaflet

Is there a way to select an individual feature based on an attribute from a FeatureGroup in Leaflet? For example, when selecting a feature based on a click event, I will do something like, function ...
1
vote
0answers
126 views

How to write features in json file after drawing point on map in openlayers3

Can i save the features on selecting points into same json file? `function addInteraction() { draw = new ol.interaction.Draw({ source: floodAlertLayer.getSource(), type: ...
5
votes
2answers
313 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
738 views

Google Hybrid Map tiles won't load in OpenLayers when centered on certain position

Since the Google Maps API update to V3.2 (17 Feb 2015) our maps have not been loading to their initial state, centered over the Gulf of Mexico. When the center location is: center: new ...
0
votes
0answers
30 views

Loading huge amount of data in OpenLayers 3

I have been working on a PoC to load a huge amount of data ~ 350k-500k but I haven't been successful so far. I tried loading JSON then converting them to ol3 features (failed at 130k) then I used ...
0
votes
1answer
14 views

Simply trying to add another layer to openlayers3 script

Hi guys so im simply trying to add new layers with each as their own variable so i can turn them on and off, instead of just stacking all the layers under the variable 'layers'. See script below ...
3
votes
1answer
28 views

How do I remove the terrain checkbox from Google Maps?

I don't mind having the map/satellite options, but I don't need the terrain option for my map. How do I disable just that? I don't see it documented well on ...
1
vote
1answer
228 views

A problem with event firing upon mouseout

I'm trying to create a point map that displays information about a point in an info box upon user mouseover and changes the styling of the point. On mouseout, I want the info box and marker styling to ...
-5
votes
2answers
67 views

How to remove attribution in Leaflet

I want to remove the leaflet.com that appears on the right bottom of the screen here
2
votes
1answer
207 views

Legend label failed to send to the print service using ArcGIS javascript

I am try to print my map with legend to PDF format; however, the legend label in the PDF is saying Override 1 instead of the label I specified in class breaks. There are other maps I can print ...
0
votes
1answer
242 views

Convert Leaflet WMS layer to Leaflet GeoJSON layer

Using the Leaflet API I am adding a WMS layer through the L.tilelayer.WMS feature. This feature includes only a certain amount of options such as 'layers','crs','style' etc. Through the Leaflet ...
1
vote
0answers
13 views

Can we combine SVG Overlay with MarkerCluster v3?

I have searched here and there on how to prevent the overlapping circle (svg) layer created from json file. Poor me, no luck till now. Since I doesn't know how to prevent the overlapping circle I ...