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
889 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
854 views

Reset Leaflet map

I'm creating a map like this: var map_object = new L.Map('map', { center: [39.8282, -98.5795], zoom: 5, }); var sublayers = []; ...
1
vote
1answer
27 views

Error in function when a class constructor called twice in ArcGIS API for JavaScript?

I want to create multiple search widgets using the "esri/search module". The second search constructor (for var geosearch) is showing an error that it is not part of function. Is it possible to use a ...
0
votes
1answer
53 views

Using OpenLayers 3 Feature onclick event?

I looked for a way to fire onclick event and I found Adding event handler to feature in OpenLayers 3? at Stack Overflow. I undestand from this question is that there is no event onclick to features. ...
0
votes
1answer
41 views

Custom Leaflet Legend

Trying to create 9 separate leaflet legend variables for the 9 different overlays (graduated colour chloropleths) I have on a leaflet map. Each overlay will have 6 classifications of colour dependant ...
0
votes
1answer
31 views

Use QuadTree for better complexity on search features

I want to improve the complexity of search specific feature when using this function : map.forEachFeatureAtPixel(e.pixel, function (feature, layer) { // Do something.. }); The improvment ...
1
vote
1answer
33 views

Toggling Leaflet Legends

Currently trying to use the following code to add and remove Legends as a result of an overlay being added to the map. Getting no error messages in browser but still doesn't seem to be working. ...
1
vote
1answer
202 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 ...
0
votes
0answers
31 views

Loading local tiles OpenLayers

Theses days i load local tiles, chrome doesn't go so well with letting you loading local tiles , because of secuirty problem as CORS etc.. but there is a way to cross this problem and let chrome ...
1
vote
1answer
336 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
32 views

Pushing value from text input to search widget in ArcGIS API for JavaScript?

I am developing a surveying app that among other things, asks the user for their address/closest street intersection, and then later asks them add features around they're "neighborhood". I would ...
0
votes
0answers
24 views

Which library map better for my use [duplicate]

I will be start by saying that for couple of weeks i have been looking for a good map library that will serve my desires well,so i started to find the "best" one. First of all my main desire is to ...
1
vote
1answer
53 views

why doesn't show feature on map

this is fiddle Link.Feature doesn't show on map when it has been like this code : var featureVectorLayer = new ol.layer.Vector({ source: featureClusterSource, style: new ol.style.Style({ ...
3
votes
1answer
41 views

OpenLayers creating Marker Vector Layer

I have seen over the internet a lot of examples of using Features paste them into the Vector layer and after that insert the layer to the map . basic example: <script> var iconFeature = ...
0
votes
1answer
33 views

Timing external javascript with ArcGIS Online embedded map

I have an ArcGIS Online time-enabled map on a webpage. When the map loads, the time slider begins moving. I would like to have a chart that moves along with the time slider, but I don't think ESRI has ...
1
vote
2answers
134 views

Applying a single leaflet search control to search multiple layers?

I am attempting to add a single search button to look through geoJSON layers. They will look through the field "name". Unfortunately, my method of creating a layer group is not working. What am I ...
0
votes
1answer
37 views

OpenLayers 3 how to get only the modified feature?

I have a problem with OL3 and it's ol.interaction.Modify Event. Whenever I modify a feature, just one, it returns all features inside the layer. Currently I have 77 features (polygons) and I can ...
8
votes
2answers
3k views

Leaflet mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
1
vote
1answer
127 views

Export PDF from OpenLayers map with jsPDF

I try to use javascript library JSPDF for export my OpenLayers map but it doesn't work. I create my HTML : <head> <script type="text/javascript" ...
4
votes
1answer
366 views

Geoprocessing Service Cannot Download Result?

I have implement the ArcGIS JavaScript example just like the ESRI official example (clip and ship) .Everything was going right except the final step ,when the gp job have finish and my browser lead me ...
1
vote
4answers
2k views

How to create working Hyperlinks in OnDemandGrid Cells

I'm creating a simple ArcGIS application that shows a table of data from a feature layer, one of which is a URL string. I'd like to make that string be a clickable hyperlink. Is this possible and if ...
0
votes
1answer
28 views

Loading Scene from ID into ArcGIS JavaScript API 4 Beta: “SyntaxError: Unexpected token ILLEGAL”

I have created a city engine web scene,and I am trying to display the 3d-visualisation view on sceneview by using the portal Item Id of my webscene. But I am getting "SyntaxError: Unexpected token ...
0
votes
0answers
58 views

JavaScript API Local Install not working

I have installed the JavaScript API locally to use in a developer environment with no internet connection. The issue I am encountering is when I attempt to view the sample service hosted by ArcServer ...
0
votes
1answer
35 views

Adding Network Analyst widget in Configurable Map Viewer (CMV)

I need to add a widget in Configurable Map Viewer (CMV), which will return me the nearest facility of parcel number entered in the box. Which is to be done by Network Analyst in ArcMap and i have ...
2
votes
1answer
163 views

Increase maximum zoom level for a WebTiledLayer in ArcGIS

I am using the WebTiledLayer from the Javascript ArcGIS API to render a custom WMTS source. The WMTS I am using has zoom levels going from 18 to 21, however I cannot zoom in further than what appears ...
1
vote
1answer
65 views

Cesium JS Line Length

Is there a method to return the length of a Cesium JS polyline, in real-world units? For example, if I create a polyline: var orangeOutlined = viewer.entities.add({ name : 'Orange line with ...
2
votes
1answer
18 views

Is there an app/plugin combination that suits the tracking of a public bus

In a town near where I live there is a public bus that runs a circuit about once an hour. I was asked if it would be easy to track the bus (presumably via an android device on the bus) and put the ...
2
votes
1answer
72 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
200 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 ...
4
votes
1answer
173 views

Why does a cache service need to load first when a dynamic service is involved?

I notice if you have 2 services 1 cached and 1 dynamic you have to load the cache first for it to display. Does anyone know why?
0
votes
1answer
28 views

Selected Feature not highlighted in map of CMV (Configurable Map viewer)

I have copied the whole code of Find widget and added it into another widget. First widget is working fine and highlighting the feature(creating feature from geometry), second widget is also working ...
2
votes
1answer
190 views

10.3 js callback appended to query call not working

I have two 10.3 ags servers that i thought were the same. But on one i can send this request to the rest api endpoint and it does not work: ...
3
votes
3answers
2k views

ESRI proxy page not working properly + CORS + cross domain scripting

I have set up a proxy page. I am using jsp version of proxy page. I have set up a server URL which will point to my Java. When I load the my page which the proxy URL has set in its html it will work ...
3
votes
2answers
60 views

Move leaflet polygon to given position

I have a circle and a polygon that I'd like to move to the user's local position. I managed to move the circle latLng but I can't find a way to do the same thing with a polygon. Can someone help me ...
1
vote
2answers
160 views

Fly To Location in Leaflet

Is it possible to 'fly to location' in Leaflet in the same way as this Mapbox GL example?
0
votes
1answer
27 views

OpenLayers line string not displaying

I am trying to show a line on map using Open Layers 3. Here is my code so far: <script type="text/javascript"> var map = new ol.Map({ target: 'map', layers: [ ...
1
vote
0answers
23 views

WebMapping Charts Overlap Issue LeafletJS

I am a beginner in webmapping development using LeafletJS and JS. I am the owner of the website built under LeafletJS. I have faced some problems with charts overlapping. On the right top of the map ...
0
votes
0answers
48 views

leaflet+canvg= leaflet svg elements on canvas

I want to create png file from leaflet map. I use html2canvas library, and leaflet map tiles and other elements convert to png great, but not svg-elements(offsets). I know, that there is some code to ...
1
vote
1answer
25 views

Openlayers 3 - Create symbol like openlayers 2 -> OpenLayers.Renderer.symbol.anySymbol

In the Openlayers v2 I could add symbols like: OpenLayers.Renderer.symbol.pointToIcon = [100, 70, 20, 50, 42, 70, 20, 90]; How can I do it with Openlayers 3 ? In the openlayers 3 I can use this ...
1
vote
1answer
52 views

D3 - Loading data from JSON doesn't work

I'm starting to learn D3 and it seems like a powerful framework. I'm trying load the data from json. I can see data but nothing happen after loading data into D3 library. There are no error messages ...
4
votes
1answer
1k views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
2
votes
2answers
167 views

How to prevent ArcGIS JS map from failing when using a Bootstrap “hidden” class?

I'm trying to put an ArcGIS Server JS API map within a div with a hidden-sm class in Bootstrap 3, so that the map is not shown on small devices. <div class="row"> <div class="col-md-4 ...
0
votes
1answer
35 views

How do you toggle between layers that have been loaded using the FileLayerLoad.js?

I'm trying to toggle between geojson layers that were loaded using the filelayerload javascript. Right now I'm basically stuck on how to append the geojson layers to one variable once they have been ...
0
votes
1answer
329 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 ...
2
votes
1answer
40 views

Map scale factor when converting from Mercator to Equirectangular

Lets say I have a map in Mercator projection, and I know top and bottom latitudes: topLatitude = 80; bottomLatitude = -55; I also know width and height of a map: width = 800; height = 500; I want ...
0
votes
1answer
37 views

Get JSON WebMap from ArcGIS JavaScript API Map object [duplicate]

I'm trying to get a WebMap object (as JSON) from a JavaScript Map object in the ArcGIS JavaScript API. Is there any way to do this within the API, without using ArcGIS.com? Ideally something like: ...
1
vote
1answer
90 views

TypeError: jsonFeatures.map is not a function using fuse-search in leaflet js

Trying to implement the fuse-search functionality in a leaflet map, however I am getting a TypeError: jsonFeatures.map is not a function. Here is my javascript part of the code: var map = ...
0
votes
0answers
36 views

Converting circular structure to JSON error

I am trying to create a feature service from a feature collection. Prior to that, a query was performed and a featureSet was produced. However, I get the circular json error when I try to create a ...
0
votes
0answers
17 views

how to know which marker clicked

I have many markers on my mapbox map. And how to know which marker is clicked. Here is my code function zoomToFeature(e) { console.log(e); } function onEachFeature(feature, layer) { if ...
1
vote
1answer
29 views

How to force EXT JS - GeoEXT to show legends with OpenLayers?

My sld is applying as below function cusMap(strSld_body,talukaName,name){ console.log(strSld_body); var query = new OpenLayers.Layer.WMS.Post(name, geoServerURL, { LAYERS : ...