Tagged Questions

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

Add an individual layer from ArcGISDynamicMapServiceLayer to the map

I have a ArcGISDynamicMapServiceLayer containing many layers. I'd need to add only individual layers to the map, like layers 2,5 and 10. The following code would add all the layers to the map: url = ...
1
vote
1answer
217 views

Calculate distance and surface with mapbox api

Is there a way to draw lines and polygons (with geojson) and calculate distance and polygon surface with the mapbox api or leaflet? I wish to have the same tools as in geojson.io with the extra ...
0
votes
0answers
31 views

feature position on non-Geo-referenced Image

I use OpenLayers to show Map , when im creating the map, i want to show map image with an ImageLayer and VectorLayers, the image is non Geo-referenced. The use case: i receiving a map image url from ...
0
votes
0answers
164 views

Print OpenLayers map with osm as background and all the vectors

I looking for an answer for a while, and i could not find a working solution. I am trying to exeport the OpenLayers map to some file - image or pdf, and i need all the background, include OSM and all ...
2
votes
1answer
349 views

How to drag a feature in Open Layers 3

I'm trying to replicate something that was fairly easy in Open Layers 2 in Open Layers 3, which is: dragging an existing feature to a new location on the map. In Open Layers 2 I just added a ...
2
votes
1answer
49 views

Make InfoTemplate moveable but still highlight attributes

I’m using the esri/InfoTemplate in the Javascript API to identify features. However, it gets anchored to the mouse click and cannot be moved around. Based on this answer I used dojo/dnd/Moveable to ...
0
votes
0answers
100 views

Land Parcel and JSON Data with onclick event

I currently am working on a school project and have been introduced to javascript with little knowledge. What the project entails is a webapp of land parcels that contain information about each one, I ...
1
vote
1answer
73 views

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

Apologize in advance as 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 ...
4
votes
1answer
134 views

Show markers only at certain zoom levels

I'm building a cycle touring map in leaflet.js, with subjective information overlaid as markers, along the lines of "this is a great road", "this town is quite nice" etc. To avoid information ...
1
vote
1answer
190 views

Function to add layer with button click

I'm working with openlayers and geoserver to create a map and overlay layers. I need to add a layer when a button is clicked, but what I get is that the layer is added ( i can see it through the layer ...
0
votes
0answers
41 views

web map with arcGIS for server and javascript?

How would I go about creating a feature layer from Arcmap, and saving it as a service to arcGIS for server, which I could call from javascript API, so the web map will provide user interaction. For ...
0
votes
1answer
92 views

Infowindow split string by comma

I might have went about this the wrong way, though I thought it may be a good idea to ask before starting over again. I have a picture column in cartodb which has multiple picture ids separated by ...
2
votes
2answers
665 views

openlayers - export map to canvas problem

I am trying to make a export control to export the map as image file. I found this example: http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html so i added the ...
0
votes
2answers
71 views

queryTask - execute vs executeForIds

When setting up a queryTask, what's the difference between queryTask.execute() and queryTask.executeForIds()? In ESRI's JS API Reference, they have the exact same descriptions: ...
0
votes
1answer
249 views

TitlePane not rendering - working with basemapGallery sample code 2

I'm having the exact same issue as this question: TitlePane not rendering - working with basemapGallery sample code but the solution doesn't work for me. my javascript: ...
0
votes
0answers
52 views

Is there a way to create a named symbol in OpenLayers composed as either a multi-dimensional array or as a MultiPolygon?

OpenLayers provides a minimal set of "well-known" shapes which can be used as point icons: /** * Constant: OpenLayers.Renderer.symbol * Coordinate arrays for well known (named) symbols. */ ...
0
votes
0answers
30 views

Display one of many rasters in Web Map

I would like to interactively add a georeferenced tif to my webmap. Use case is: I have a raster catalog of georeferenced tax maps. I would like to be able to select those tax maps (there are ...
0
votes
1answer
51 views

ArcGIS JS - Feature Layer selection symbol before layers loaded

I have a feature layer that is dynamic and could pull a geometryType: esriGeometryPoint or geometryType: esriGeomertyPolygon I was wondering how would I know when to set the selection symbol to ...
0
votes
0answers
41 views

Query results feature set to a brand new Features set

Here what I am trying to do: 1) My overall goal is to query an extent and to extract data by this extent. I can successfully achieve the first part. 2) Here is my issue: The Dynamic layer queried has ...
2
votes
1answer
181 views

How do I plot a line on a map, or obtain the latitude and longitude coordinates of such a line, that is 120km north of the US-Canada border?

How do I plot a line on a map, or obtain the latitude and longitude coordinates of such a line, that is 120km north of the US-Canada border, including parts of the border that cross water? (I managed ...
0
votes
0answers
33 views

Access multiple feature servers through ArcGIS REST API

we are adapting a web app to support an ArcGIS server back end through the use of Javascript ajax calls which in turn display the data using Leaflet. The current version of the application runs ...
0
votes
0answers
27 views

How to run GeoAdmin3

I coloned Geoadmin repo from github. I tried tu run this localy but no sucess. I have my own rc_ file but still it's not working. Anyone can help me?
0
votes
0answers
56 views

map stops at map.graphics.add(graphic);

function getLocRes(results) { //map.graphics.clear(); var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new ...
1
vote
0answers
106 views

Customizing map.on(“click”) while using default editor widget

My question is whether or not it is possible to use the default editor widget in my case given the needs of my application. My map consists of points displayed from four different FeatureLayers. They ...
0
votes
2answers
110 views

ArcGIS Javascript API - switch case to display attributes in a popup

var vliTemplate = new InfoTemplate("Visual", "<tr><b>VLI Number:</b> <td>${VLI_VLI_NO} </tr></td>"+ "<br><tr><b>Not Greened Up ...
0
votes
1answer
76 views

problem login geoexplorer - redirect IP

I have problems when I want to log the administrative user through GeoExplorer when geoserver is running on a server with public ip but redirection to a private ip. GeoExplorer takes too long to load ...
0
votes
0answers
44 views

Openlayers WFS change featureType

I am trying to change wfs featuretype "on the fly" in openlayers. (This method http://dev.openlayers.org/docs/files/OpenLayers/Protocol/WFS/v1-js.html#OpenLayers.Protocol.WFS.v1.setFeatureType) This ...
0
votes
0answers
50 views

GP clip and ship crash. Any idea?

I have been trying to implement this code for a few weeks but always run into new issues. It seems like everything is working fine now except my clip and ship GP. It always returns the GPerrorFailed ...
0
votes
0answers
64 views

Handling Popups in Leaflet with Overlapping Features

I am new to Leaflet as well as Javascript, and I'm looking for some advice on a basic topic. Currently, I am trying to create a spatial index of library holdings for old topographic maps that people ...
0
votes
1answer
45 views

How can i figure out to convert this points to latlong?

I got below data in sql server, Learned that data is collected under zone IIIa considering Lambert Conformal conic projection in India. The data is generated from Spatial Cadastre Software. Also ...
0
votes
1answer
87 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", ...
0
votes
0answers
34 views

How can I use the SLD and SLD_body arguments?

How can I use the SLD and SLD_body arguments of a GetMap request with the mapA.overlayMapTypes.ImageMapType object? var wmsOptions = { alt: "", getTileUrl: function (tile, zoom) { return ...
0
votes
0answers
251 views

Help needed with query task results to show in dojo Grid?

I am trying to create a search widget where the HTML tempalte of the search is as follows: <div class="gis_SearchDijit"> <div class="formContainer"> <div ...
0
votes
0answers
40 views

ArcGIS ApplyEdits w/ JavaScript

I'm new to ArcGIS API. In a form, how can you submit data to modify a feature using applyEdits? No map is involved with this. I have a form that populates the editable data with javascript. When the ...
1
vote
1answer
140 views

Web API for reverse geocoding geographic features

Is there a free web API that can reverse geocode geographic feature names? I'm currently using the Google API, which will return political and street address info, but I would like to return the names ...
1
vote
1answer
514 views

register to event in openlayers 3

I have a web application in openlayers and I am starting to rewrite it to openlayers 3. In the application i have some features that i need to delete/move/add/edit the features then to save it to the ...
0
votes
0answers
45 views

openlayers setCenter issue (other posts on this do not solve it)

I can't get map.setCenter to display an OSM layer (via openlayers) centered at my specified coordinates. Instead it defaults to the West Coast of Africa. The zoom level does however work. Both of ...
1
vote
1answer
174 views

Add line break to ArcMap 10.2 label expression

How can I add a line break to a jscript label expression? My expression so far looks like this function FindLabel ( [NAME] ) { return [NAME]+'National Forest'; } I would like to add a break after ...
1
vote
1answer
118 views

CartoDB/Javascript - Layer Selection Buttons help

I'm trying to make my own layer selector (due to the CartoDB one not appearing on mobile devices) and I'm having issues, mainly due to my lack of experience with Javascript. The issue seems to be ...
1
vote
1answer
25 views

Decarta - how to refresh map

I am using the Decarta JS API. I am displaying a map with layers. I want to refresh the map and redraw new layers, but I see no way to do this in the documentation. Is there a way to refresh the ...
0
votes
1answer
47 views

Select all features close to clicked

I have an openlayers map with more then 20000 features not in wms, only in vector layer. I have a control to select features, but sometimes it's really hard to select, specially the lines, and also ...
1
vote
0answers
54 views

Multi layer, multi control

I am new to GIS technolgies. I'm working on the final project of my career. I need to have a background map of somewhere on this map I need to create 1 .. N layers in which a particular user can ...
4
votes
2answers
200 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
0
votes
1answer
74 views

OpenLayers/Leaflet render world borders

I am trying to show all world borders. Either using OpenLayers or Leaflet. World borders are taken from here. This code does not work. What I am doing wrong? var Map = { map: null, layer: null, ...
0
votes
0answers
770 views

Acess control allow origin header is present on the request resource. Origin null is therefore not allowed acess

I'm trying to use the openlayers vector class. And the error occurred: Acess control allow origin header is present on the request resource. Origin null is therefore not allowed acess I've put ...
0
votes
0answers
44 views

ArcGIS JavaScript problem with legend to show attributes

I'm running a geoprocessing task in my webapplication. When the task generated some results i destroy an existing legend and build up a new one that shows the legend for the resulting layers. That is ...
1
vote
1answer
119 views

Opacity contrl for mapbox map with several layers

This is an example of how opacity can be changed for a Mapbox.JS map: https://www.mapbox.com/mapbox.js/example/v1.0.0/opacity/ The example shows only one layer used. With barely any experience in ...
0
votes
1answer
46 views

How to detect if a point lies inside a building?

My main motive is to detect if there's in any infrastructure nearby to a given point in a certain radius. For this I am using Places api and using nearbySearch method of it. The problem in this is ...
0
votes
1answer
60 views

Placeholder Text in search box - Cartodb

I am trying to add placeholder text to the Cartodb searchbox using the following DOM code document.getElementsByClassName('text')[0].placeholder='Search Your Constituency'; It actually does not ...
0
votes
0answers
55 views

Leaflet JS - Polyline and getPopup

I would like to get the popup that was bound to a polyline but it seems that unlike marler objects, polyline do not have such method. Any suggestion ? Also, it seems that the 'popupopen' event is ...