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

Viewing a point geojson layer as markers in cesium

I have a point geojson layer and i would like to add and view it using cesium. I tried with the below code var dataSource1 = new Cesium.GeoJsonDataSource(); var roads = ...
1
vote
1answer
498 views

Using sql SELECT DISTINCT in Fusion Tables API

How do I go about using sql SELECT DISTINCT in fusion tables API?
-3
votes
0answers
21 views

Proj4js not working

I'm using proj4js library in Openlayers 3 to reproject a simple osm map so I can have the center of my map located in Greece (EPSG:2100). So I'm having this code: <script> var osmLayer = ...
0
votes
0answers
32 views

Cannot draw two layers at once using Leaflet

I have two map layers that I want to show at once: One is the full data, the other is a filtered version of the data. The map will draw with each of these layers, but not with both at the same time. ...
1
vote
1answer
28 views

Checking if point is inside irregular polygon?

I'm using Javascript (https://github.com/substack/point-in-polygon) to test if a point is inside polygon, however I think it's adapted from ...
1
vote
1answer
346 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); ...
1
vote
2answers
169 views

Openlayers - ModifyFeature - How to label vertices with a progressive number

I am quite new in openlayer and javascript. I have a control ModifyFeature on a path vector layer. I would like the vertices to be rendered with a stylemap label showing their progressive number ...
2
votes
1answer
56 views

Leaflet map draggable marker events

Everytime I click on the map I create a draggable marker with a drag function. It works great, however everytime I release the mouse after I dragged some marker, the click event of the map is ...
1
vote
1answer
520 views

How to add custom basemaps to BasemapGallery

I would like to add my own custom basemaps to the BasemapGallery. Is there any way I can create my own BasemapGallery with only my maps? I am using the ArcGIS API for javascript. EDIT: for clarity I ...
0
votes
0answers
25 views

Adding intelligent search box to cesium for implementing search within layer from server side?

There is a default search box in cesium to search by address or by landmark. Now i want to add a intelligent search box to search within the layer. I would like to know how to add such search box and ...
1
vote
1answer
195 views

How to create a infotemplate that displays automatically

I have created a postcode search that that highlights a polygon and zooms in. but I would like it to display a infoTemplate box with having to click in it. I want it to show when the function runs. ...
1
vote
1answer
217 views

Legend ArcGIS Javascript does not recognize Legend from ArcGIS for server 10.2.2

I have created maps in ArcGIS for desktop and published them to ArcGIS for server 10.2.2. Because of performance issues I have created a group layer of the same map with different levels of details. ...
1
vote
1answer
521 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. ...
0
votes
0answers
8 views

Using IDW method and its output raster in a web app

I am creating an web app and needs to interpolates between some points- Weather data- (with IDW method) and show the results as a raster (like the output from ArcGIS) so a user can click on raster and ...
1
vote
1answer
160 views

Using AndNav tiles storage as input for OpenLayers.TMS

Is there a possibility to use map tiles from AndNav (created wit Mobile Atlas Creator) that are in format: Mapnik\12\2241\1369.png.andnav (I know that 12 is the zoom level but don't have idea what is ...
0
votes
1answer
204 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 = [ ...
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 & ...
4
votes
1answer
46 views

Better (faster) way to join a csv to a geojson in Leaflet?

My goal: Store the attributes of a geojson in a csv file Allow a non-GIS user to edit a cloud-hosted csv file which then updates a webmap Have the web map be a static app with no GIS/PostGIS/SQL etc ...
2
votes
1answer
33 views

Using Multiple Versions of ArcGIS API for JS in Same Application

We've a large web based GIS application running which uses an older version of ArcGIS API (v3.7) for JS. The ArcGIS JSAPI v3.7 is lacking some functionality which are available in v3.15. Now I also ...
0
votes
1answer
241 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
36 views

Azimuthal Equidistant Projection - Rotate projection

I am using Azimuthal Equidistant Projection to plot points in a map being drawn in an Android application. The origin is the centre of the map. I have the formulas from here and here. I am getting ...
1
vote
1answer
60 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
0answers
17 views

Caching 10.1 to 10.3.1 version change caused issue?

In an ArcGIS Server 10.3.1 website we have two cached web services that will not display. A separate Server 10.1 shows them both without issue. Any ideas why the one Server will not show the ...
1
vote
1answer
34 views

ESRI Print Task (export web map) returns 500

I tried to export web map(Esri) with print task service. it works in localhost and in staging.xxx.com(http) too.But in preview.xxx.com(https) , it throws the error 500: Error performing execute ...
0
votes
1answer
175 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 ...
3
votes
1answer
528 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
0answers
6 views

CartoDB infowindow stuck at the top of the browser page

I am trying to put infowindows in my CartoDB.js map, but currently my infowindow is stuck displaying in the top lefthand corner of the browser window instead of over the points clicked. This is my ...
2
votes
1answer
963 views

Programatically add feature to Feature Layer with ArcGIS JavaScript API

I've so far been able to add a feature layer from an ArcGIS server, and I've also been able to add an editor widget which allows me to draw to feature with the mouse. The added features are being ...
0
votes
1answer
53 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 ...
0
votes
0answers
9 views

Want map layer colors to change with button clicks… One of them isn't working correctly!

I have three buttons that show different queries on a data set. I want them each to also display in a different color. When the map loads, I have the default layer in blue. However, After clicking the ...
3
votes
2answers
478 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
1answer
52 views

Viewing a geojson as 3D in cesium

I have a geojson with height informations in it. I tried adding the geojson to the scene using var viewer = new Cesium.Viewer('cesiumContainer', { sceneMode : Cesium.SceneMode.SCENE3D, timeline : ...
0
votes
1answer
30 views

Arguments not working in cartoDB createLayer method

I added a cartoDB layer to an existing map using createLayer method and it loaded properly. Thereafter, created a variable params and parsed the arguments as sees on the code snippet below. ...
0
votes
0answers
25 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 ...
3
votes
2answers
717 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 ...
1
vote
0answers
24 views

Changing layer color with a button click

I am trying to change the color of my map layer when filter buttons are selected. So, the goal is: the user sees all of the data in one color. Then, when they click on a filter button, only a subset ...
0
votes
0answers
50 views

OpenLayers 3: does not display all Features of Layer

I'm using openlayers 3 and geoserver. I want to get and display a wfs layer with openlayers. this is source of my layer: vectorSource = new ol.source.Vector({ format: new ...
0
votes
1answer
245 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
0answers
34 views

OpenLayers 3 : ol.View setMinZoom or setMinResolution?

I'm working with OpenLayers 3.14 and still have the same problem that should be so simple. I'd like to change the ol.View object properties, but not in the same declaration than the var map = new ...
0
votes
1answer
29 views

Error with popup overlay in OpenLayers 3?

In OpenLayers (OL) 3.15.0 I declare a popup contains like : popup = $(eval('<div id="popup"><p>My contain</p></div>')); And after, I declare my overly with this popup ...
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
448 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 ...
0
votes
0answers
15 views

Building layer not showing any attribute when using feature grid plugins in gxp app.js?

I am following the OpenGeo suite 4.8 building complete web application tutorial. In that tutorial I am trying to add feature grid of a layer as mentioned in tutorial. But I am not getting any ...
0
votes
0answers
19 views

Draw point turns into panning for Openlayers 3?

I've been trying to use the draw interaction on OL3, and as soon as I drop the point on my map and leave the on draw.on('drawend function, the map starts panning like its bound to the pointermove ...
1
vote
2answers
1k views

Using OpenLayers 3 spyglass?

I would like to use OpenLayers 3 spyglass example inside my project. The problem is when I want to use selection for layer, which will be inside spyglass circle. I can't get it working, I don't know ...
1
vote
1answer
206 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
30 views

Is there any way to use Cesiumjs to import 3D Models using the British National Grid (OSGB36)?

I am trying to import a 3D model (.gltf) into Cesium which is in OSGB36 projection, however I know that Cesiumjs doesn't support British projection natively. I've tried changing the origin of the ...
0
votes
0answers
27 views

Google Maps does not show NASA world view maps layer. JAVASCRIPT

The function is called on window onload but I am uncertain about the getTileUrl's anonymous function. where does it get the tile and zoom parameters from. The main problem is it does not show the ...
6
votes
1answer
524 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
449 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 ...