JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

learn more… | top users | synonyms

0
votes
0answers
56 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
90 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
39 views

Drop Marker with 3857 projection in leafletjs

Is it possible in leaflet to drop marker with 3857 projection on map? I fond a solution where first translate point to 4326 using proj4js and than drop it on map. var source = new ...
1
vote
1answer
54 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
56 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
21 views

Customize LabelLayer extent based on density/location using ArcGIS JavaScript API

I'm using a LabelLayer that can be seen only within a certain minScale - maxScale window. I'm trying to display labels of census tract IDs within Illinois, and the difference in label density between ...
0
votes
0answers
27 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 ...
1
vote
1answer
291 views

ESRI JS API - How to get event object from Draw Toolbar onDrawEnd

I am using the Draw Toolbar in the Esri Javascript API v3.4 and connecting to the onDrawEnd event using aspect.after(drawingToolbar, "onDrawEnd", drawEndHandleFunction, true); I am using the Draw ...
0
votes
0answers
31 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
22 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
2answers
80 views

MapServer: Symbol color is set in mapfile. Is there a way to change it using javascript (ie not in mapfile)?

I have a mapfile where the symbol color is set to blue. In my html I have a hover event that brings a popup when the user puts their cursor over the symbol. Working as intended. Now on that same ...
0
votes
1answer
41 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 ...
2
votes
2answers
144 views

District border join in Google maps

I am developing a district editor for cities. The idea is that we divide the city into districts. I am using GoogleMaps, but any other js library is acceptible. Problem 1: districts are connected ...
0
votes
0answers
23 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
100 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 ...
1
vote
1answer
83 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 ...
0
votes
0answers
25 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 ...
0
votes
1answer
34 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 ...
0
votes
0answers
27 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
81 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 ...
2
votes
2answers
1k views

Animated lines and line styles in Javascript

I'm using Leaflet library and Mapbox. I need to create animated line from one city to another, slow motion "travelling" from one point to another point. Is that possible in javascript and how? I can ...
1
vote
2answers
508 views

How to prevent automatic new line when labeling point feature class?

I have a point feature class that I am labelling with the string "EXIT" for a majority of points, but some points will be longer, such as "EXIT into Pacific". I wrote a labeling script that will ...
1
vote
1answer
77 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 ...
0
votes
1answer
14 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
0answers
30 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 ...
3
votes
3answers
908 views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
1
vote
0answers
36 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 ...
0
votes
0answers
562 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
1answer
42 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, ...
6
votes
3answers
1k views

tiny JS discretization library for choropleth representation

I would like to know if a tiny stat/discretization js library ready to use exists. I do know about the existence of jStat (which I may explore a little bit more thoroughly), and I know that mapfish ...
4
votes
5answers
1k views

How to get a Leaflet app with a big GeoJSON file to work on mobile devices?

I have a leaflet app which displays a GeoJSON file as a layer. It works fine in the web browser. On the mobile browser it starts up, but quits after panning around on the map. I think the reason for ...
0
votes
2answers
153 views

Programatically adding popups into OpenLayers map

I'm developing a web service and want to inset multiple popups dynamically to a web page according to the request. What I did was this <script> //injected programmatically var popups=[]; ...
4
votes
2answers
13k views

How do you get the coordinates from a click or drag event in the Google Maps API V3?

I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the marker when it is dragged or clicked. Below is my code: <!DOCTYPE html> <html> <head> ...
0
votes
1answer
33 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
41 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
38 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 ...
4
votes
3answers
427 views

ArcGIS Javascript API with Windows Authentication

I am using the ArcGIS Javascript API to consume a feature layer on an ArcGIS Server secured with Windows Authentication. I want to satisfy the authentication programmatically so the web user isn't ...
6
votes
1answer
5k views

How to Add/Remove Legend with Leaflet Layers Control?

I have two overlays http://02d0c8c.netsolhost.com/dev/lcb_census_layers3.html that can be turned on and off with a Layer Control. I’d like the legend for each layer to turn on/off along with the ...
1
vote
0answers
59 views

Geoserver WFS Fails to Load in OpenLayers

I'm working with Postgis->Geoserver->openlayers on localhost. I followed a Geoserver tutorial to import some nyc sample data into my postgres/postgis database and link it to Geoserver. The layer ...
1
vote
0answers
200 views

esri ArcGIS javascript api compatibility with Internet Explorer 7 and 8

I've developed a web map using esri arcgis javascript api version 3.8 and its not compatible with IE 7 or 8. I've advised the people who have reported this to update their version of IE but, if it ...
1
vote
2answers
131 views

How to load big geo-data file into web application

I am building a web app where I show details in map. I load data using geojson file (190 mb). I was looking in different possibilities to show the data, here there are: Leaflet GeoJSon: it should ...
0
votes
0answers
49 views

OpenLayers 3, Markers appear in different places when viewing with iPad

I have an OpenLayers3 map showing static map image an ontop of that a vector layer containing markers (features). The features display nicely when viewing the map on a laptop or a pc, but when viewing ...
0
votes
1answer
269 views

JavaScript API - Query and Edit point from Feature Layer

I am attempting to recreate the ESRI example for attribute inspections (https://developers.arcgis.com/javascript/jssamples/ed_attribute_inspector.html). I am having an issue when I create my feature ...
9
votes
2answers
2k views

How to add a layer to SelectFeature without losing existing selections?

I'm using an OpenLayers.Control.SelectFeature for selections on multiple layers. However, when I add a layer using setLayer(), my selections on the other layers are lost. Anyone know how to work ...
1
vote
0answers
33 views

Automatically update the result of a QueryTask

I have developed a application using the ESRI JS API to allow users to create and edit features in a web map. I have used the QueryTask to create summary statistics to report back to the user on ...
0
votes
1answer
222 views

How to add content below the map with Javascript? [closed]

Is it possible to enable some container below the map with JVectorMap? I have some links for all states which needs to appear when user clicks on state. I am new with Javascript so please help me. ...
1
vote
1answer
36 views

Calculations from Feature Server and display values

Using the ESRI JS API I would like to apply some basic math based on the Shape.area of a feature and then return that calculation to the web-page. I can't see any reference to something even remotely ...
0
votes
0answers
36 views

Insert a Mapnik Tile Between Google Base Map and Label Image

I'm currently using Mapnik to create choropleth tiles of regions in Brazil via node-mapnik by using the g.connector from Wax as in the code below and it works well. var map = new ...
1
vote
0answers
83 views

CORS Printing Issue with ArcGIS Javascript

I'm developing an application using the ArcGIS Javascript API and everything has been working fine until I've tried to incorporate the print widget using printtask. When only the base layers are ...
0
votes
2answers
108 views

How to add a floating “crosshairs” icon above leaflet map?

While reading the article about MapBox's map utility to searching for flight MH370, I noticed that they have a stationary "floating" target (or crosshairs) icon that helps users identify the center of ...