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

Adding a layer in Openlayers returns error

I am trying to understand why the following simple code of adding a layer in openlayers gives an error (adds the layer in layer switcher but everything gets pink): //alert(layerName); var ...
0
votes
0answers
4 views

how to search for a Point of LineString geometry in a json file using OpenLayers 3

I have a json file with polygons. Here I added the json layer onto OSM layer(baselayer). I would like to search for a Point's LineString in the layer, from which LineString that Point been selected. ...
0
votes
0answers
3 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: ...
0
votes
0answers
13 views

XY bounds for L.tileLayer in CRS.Simple

Sorry for my english Hi, I have leaflet.js (image of map 5913x7863) and there L.CRS.Simple I had var imageBounds = [[1468.9700,-11.7050], [1968.2705,363.7705]]; var file0 = new ...
0
votes
0answers
11 views

How can I sync a vector image with a leaflet map?

I am trying to create the following: For the user to interact (hover, click, etc) with vector layers on the left, and have a leaflet map respond to it on the right. I have used the following that ...
0
votes
0answers
14 views

How to access the Metadata link URL field of GeoServer using the OpenLayers Library?

Geoserver v: 2.4.4 OpenLayer v: 2.13 All maps are WMS. In my javascript I use "layer.name" to access the Title of the specific map as specified in my GeoServer layer. Using jquery I was able to ...
0
votes
0answers
9 views

how to store edited features on map into json file in ol3 using javascript

I added two vector layers which are downloaded from geoserver into my eclipse and i am displaying the layers on osm layer. After i added drawing features on vectorlayers i cannot able to save features ...
0
votes
1answer
10 views

Redirect if Clicked on a Marker in CartoDB

How can the user be redirected if he clicks on a marker in CartoDB? I have a dataset with the markers — the geometry and inside of the description-field the URL to redirect the user. I know I can ...
0
votes
0answers
16 views

Refresh Openlayers vectorLayer every 5 seconds with jQuery and Ruby

Ich want to refresh my vectorLayer in OpenLayers every 5 Seconds using a jQuery. How do I have to do this? The data for the Layer is stored in a Ruby KML. Just look at the Code. Ruby method for the ...
0
votes
0answers
10 views

Adding UTM to dijit measurement location in JAVA API

2 coordinate systems are shown when using dijit measurement by default. is it possible to add UTM to the Dropdownlist ? Here is the code : var measurement = new Measurement({ map: map }, ...
0
votes
1answer
23 views

Create KML in Ruby with ruby_kml and use in Javascript

I want to create a KML in Ruby and use it with Openlayers. But Openlayers only wants a real KML file. It's complicated to explain. Just look at my Code: In my Controller I have the following method ...
0
votes
1answer
22 views

How to get GeoJSON properties to appear in popup on feature click in Openlayers3?

I have a map with a base layer and a geojson cluster layer. I want to be able to click an individual feature on the map and have the contents of the properties be displayed in a popup. I currently ...
2
votes
1answer
19 views

Layer selection visibility unchecked in initial state in OpenLayers 3

I have this JSFiddle example that has two vector layers in it, 'Cities Layer 1' and 'Cities Layer 2'. As you can see from this example, cities layer 1 has a visibility set as the default of true and ...
0
votes
1answer
26 views

Unable to serve Cesium Terrain files

I am trying to generate 3d Terrain. I am serving the terrain files at localhost:8081 Here is the Cesium Code var viewer = new Cesium.Viewer('cesiumContainer', { baseLayerPicker : false, ...
0
votes
1answer
19 views

GeoJSON not being shown

I was trying to add a GeoJSON feature implementing leadlet, but with no avail. Cannot figure out what is going on? <!DOCTYPE html> <html lang="en"> <head> <meta ...
0
votes
1answer
13 views

Error Using 'L.mapbox.featureLayer' to load GeoJSON with pointToLayer Option

I am currently working on a project where I am loading GeoJSON into a map. The GeoJSON will include circles, point markers, and the other essentials shapes. I've been having this issue that I can't ...
0
votes
1answer
16 views

Buttons wont work when I copy the Content of the TOC dynamically into dojo FloatingPane and back

We work with a combination of dojo Vers 1.10 and ArgGis Javascript APi 3.11. We were asked if it ist possible to copy the TOC Layerlist into a seperate dojo FloatingPane by rightclicking into the ...
0
votes
1answer
47 views

How to introduce variable time interval in “window.setInterval(function() {…” segment?

The following leaflet codes draws a series of markers one by one. How to introduce variable time interval in "window.setInterval(function() {..." segment?. I want to display each marker for the time ...
0
votes
0answers
19 views

How to find the area of a feature in OpenStreetMap, using overpass api and javascript

I am creating a calculator and I would like to know the area of parks/water bodies in a specific area. This would have to be dynamic. I have successfully requested all the features I need using the ...
0
votes
1answer
21 views

Leaflet MarkerCluster custom info window instead of spiderfy effect

So I have been experimenting with the Leaflet Marker Cluster and was wondering if there is a way to disable the spiderfy animation and change the event when cluster is clicked on? Instead the clicking ...
1
vote
0answers
22 views

How can I access the array of predicted addresses from Google Maps once an address is entered?

The Google Maps JavaScript Autocomplete API mentions that autocomplete returns an array of prediction objects. How can I access this array without autocomplete? I have a standard HTML form with ...
0
votes
0answers
39 views

How can I get the mouseover event to work in my Leaflet.js map?

I have been trying to follow this mouseover example on the Leaflet.js website but I can't get my test version to work properly. The mouseover works only in some shapes at a time, but the mouseout ...
0
votes
0answers
16 views

How to customize heatmap color on pre decided constraint values?

I am working on heatmap and situation is i have to change the color of heat map marker on the basis of some constraints and the color should change according to those basic constraints values. My ...
0
votes
1answer
18 views

Adding markers within constituency bounds using leafet.js and leaflet-pip

I'm trying to make a map where a user can select a constituency and then see a series of markers, from a much larger list, that are only within that constituency. I have the code below, and if you ...
1
vote
1answer
43 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 ...
0
votes
1answer
23 views

How can I make a map-marker's popupContent be a random phrase?

I'm using leaflet.js to make a map and I need help with the javascript required to make a map-marker generate a random phrase with each click. I've used this code to generate random text: function ...
0
votes
0answers
46 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 ...
0
votes
0answers
24 views

Web Application for display raster data on basis of time slider

It May act as a duplicate question to many, but i have tried refering too all the questions related to my questions, but i am still confiused. Below in attached my code. which i use for Web Mapping ...
0
votes
1answer
71 views

Loading GeoJSON data into an array with OpenLayers 3?

First off I'm using OL 3.6 with no additional plugins. Pretty simple question that I thought would have been asked already/would have been much more readily available, is there a way to store points ...
0
votes
1answer
42 views

How to call a leaflet Javascript Function in dropdown menu bar?

i have the following problem: my target is a hybrid app with leaflet. I create a dropdown menu with html/CSS/JQuery. Here is the code: <nav> <ul> <li id="menuPoint1"><image ...
0
votes
0answers
66 views

Open Layers 3 Zoom to extent only working in debug

Im using gpx data to display routes with open layers 3 and my attempts of zooming to fit the gps trace have been thus far unsuccessful. I only ever got it working in debug mode on firefox, where it ...
0
votes
0answers
21 views

Is there a way to measure height & width on extruded geometry (like 3D buildings) in Google Earth Plugin API?

Is there a way in Google Earth Plugin API to measure the heights & widths say for example between two clicked points on an extruded geometry of a 3D building over Google Earth Plugin? Something ...
3
votes
1answer
62 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 ...
1
vote
2answers
49 views

Configure default styles in LeafletJS

I want to change the default styles for vector layers in my Leaflet version 0.7.3. I can't find anything about that in in the documentation, so I made this hack: map.on('layeradd', function(e){ ...
1
vote
1answer
22 views

Simple popup for multiple WMS

I have multiple WMS in openlayers with a layer switcher and can be turned on and off. Now i have an image of each WMS, what i want is to show image of each WMS on click OF that corresponding WMS. ...
1
vote
1answer
22 views

Bubbles in Kartograph.js

I am trying to create the bubbles on my SVG map generated by Kartograph. I want to do something like this: http://kartograph.org/showcase/symbols/ The map loads but the symbol does not display. I ...
0
votes
0answers
14 views

Geocoder Rest API different results than ArcGIS Locator separator?

In our JavaScript API we use a Geocoder to find buildings and rooms on our campus. So we created a own locator, which can find room numbers, room names, types of rooms and buildings. In ArcMap the ...
0
votes
1answer
52 views

Openlayers 3 Cluster Strategy not projecting properly

As the title suggests, my Openlayers map is not displaying clustered points properly and I'm not sure why. My code is pretty simple and straight forward, here it is: JSfiddle: http:// ...
0
votes
1answer
32 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 ...
1
vote
1answer
42 views

How to add href to popup (infoWindow) in ArcGIS API?

I'm a newbie in programming. I'm trying to make a href link inside of arcGIS js infoWindow (popup). I don't know how to make this link work. The code that I'm trying is shown below. Could you please ...
0
votes
1answer
25 views

How to display the attribute table of the map using leaflet

I'm developing a leaflet application. for that i want to display the attribute table of particular wms layer using leaflet. Is it possible how can we do that? Thanks in advance.
1
vote
1answer
32 views

Using auto-completion/code-completion in OpenLayers 3?

I wonder how I can make use of code-completion with ol3? In debugging-tools like firebug I can use the completion but I haven't figured out how to use the completion in an IDE. ( for OpenLayers2 it ...
1
vote
0answers
15 views

Telerik ajax RadMap

I am using telerik RadMap with client side binding in the OnInitialize client event. Copied from the examples: function OnInitialize(sender, args) { var originalOptions = args.get_options(); ...
0
votes
0answers
28 views

Google maps not displaying until zoom in/out using openlayes2

I am using openlayers 2 for map displaying using following code, map = new OpenLayers.Map("mapDiv"); map.addLayer(new OpenLayers.Layer.Google("Google Streets",{numZoomLevels: 20})); ...
0
votes
1answer
23 views

how to customise toobar in Leaflet.Draw plugin?

I Down load the Draw.js and one ccs file to get use of the Leaflet.Draw plugin now need to customise the toolbar(i.e want only polygon and marker)
1
vote
2answers
21 views

Problem with MapServer WMS

Below code is showing the addition of mapserver file in openlayers 3, it is successfully showing me image in the browser but when i zoom that image it does not zoom. It comes back to originial view. ...
0
votes
1answer
45 views

Plotting shapefile on map using ArcGIS API for JavaScript?

We are using dojo framework to develop our portal.We have bind the arcgis map in our web portal.Is there any arcgis JavaScript API which will accept the path of the shape file and plot that shape ...
0
votes
1answer
40 views

Plotting GeoJSON data on map using ArcGIS API for JavaScript?

We are developing the portal in which we are using Arcgis javascript APIs.The requirement in our project is one of the weather provider is going to publish the webservice which will return the weather ...
0
votes
1answer
42 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
1answer
43 views

Adding MapServer layer in Openlayers 3

As per i know that there is an API called Openlayers.MapServer in openlayers 2, which is used to show MapServer file in browser in openlayers. How can i add an MapServer file in Openlayers 3, as i ...