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
vote
1answer
654 views

Polymaps + D3+ Polyline with different width and color

I am actually working on a project which involves polymaps and D3. I was wondering if you could help me on this. I have 4 locations and I would like to draw a polyline from one location to other 3 ...
8
votes
5answers
10k views

OpenLayers - redrawing map after container resize

In my web application, I want to enable users to set the size of the map container. Everything worked fine when the container was expanded slightly (apparently this is because the tiles that were ...
5
votes
6answers
955 views

3D perspective on maps in Leaflet, CartoDB?

Are there any JS library out there that would render normal, flat maps (like Leaflet) into a perspective map like this one, on the web: Also, anyone seen anything that could turn CartoDB data into ...
0
votes
2answers
48 views

ArcGIS Javascript API: Get Map Object from DIV

So I am currently writing an application using the ArcGIS JavaScript API, and I want to access the map object that is held inside of my div from a js module I have. I was thinking it would be a simple ...
2
votes
1answer
50 views

FME Server API - Retrieve Output file as a URL

I have a FME Server web workspace converting a file from SHP to KML, once it runs it outputs a kml file, I need to be able to take this file and drop into my web API google Map. Is there a way to ...
0
votes
0answers
22 views

Map Route Direction Zoom to Segment

Basically I am trying to zoom to certain route segment when getting direction on OneMap. Here is the JavaScript codes where I trying to plot a route and zoom to certain route segment: function ...
0
votes
0answers
42 views

How to use Javascript Esri map as GPS Tracking?

I have an android application that get the gps coordinates of the device and stores it in a remote mysql database. I want to use ajax to display the coordinates in a javascript api using esri. I just ...
0
votes
0answers
32 views

Plotting a Route on Google Maps using a string passed to a function as a parameter

I'm trying to plot a route, using Google Maps. I need to be able to pass a string to the function, to build the Polyline. I can do the following and it works fine: var flightPlanCoordinates = [ ...
0
votes
0answers
14 views

Function that returns the coordinates of the searched address

I'm using Java and GMaps4JSF to make an application where the person pesquisaum address that address is displayed on the map. As the code below, but I need to create a javascript function that ...
0
votes
1answer
78 views

Leaflet Custom Control Fails

Why does the myMenu control not respond to a click? var map = L.map('map').setView([51.505, -0.09], 13); L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', { maxZoom: ...
1
vote
2answers
57 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
0
votes
1answer
226 views

dojo/parser::parse() error TypeError {stack: (…), message: “Cannot read property 'toString' of undefined”}

I'm trying to get the overview map example working from here: https://developers.arcgis.com/javascript/jssamples/widget_overviewmap.html in my site. I have two errors. Chrome gives the one above in ...
1
vote
2answers
113 views

Looking for dissolve algorithm for Javascript

I have three adjacent polygons that together make up a larger shape. I need an algorithm that will dissolve the internal borders leaving only the outside border. An example would be a group of ...
0
votes
1answer
79 views

Leaflet rendering TileMill tiles in the wrong order

I'm stumped, and quite a lot of searching has turned up nothing helpful. I'm on the first step of what will ultimately be a map with three raster layers and three layers of markers (with controls to ...
0
votes
0answers
25 views

Finding adjacent tiles in Google Maps

I built a NodeJS API that returns locations and returns paths and stores them locally in MongoDB for fast responses. Also another part of the API is that it returns compositions of tiles ...
0
votes
0answers
14 views

applyEdits method and File on arcgis feature service

I would like to know if it's possible to upload a file through the applyEdits method on a feature service? I have an Oracle database with a parameter "DOCUMENT" of type BLOB. I would like to upload ...
0
votes
1answer
32 views

How get the link or file from uploads forder of feature service arcgis

I have succeeded in adding a file to arcgis server with the upload method of a feature service on arcgis server. But i can't see how to download what i have uploaded to. Do you have any idea on how I ...
2
votes
2answers
52 views

How to insert coordinates to url

What would be the approach to show and dynamically update the map coordinates in the url like stamen is doing it? Are there any built in functions in OpenLayers, what other techniqes could I use or do ...
0
votes
0answers
297 views

Google Maps V3 + multiple Fusion Table layers = inconsistent markers?

One of my colleagues is working on a map for a news story and is having some difficulty getting the markers to consistently show up. Changing the order in which the layers instantiate is causing ...
2
votes
1answer
334 views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
2
votes
1answer
171 views

Leaflet center Marker AND Popup on Map viewport

I want center my marker on popup open.. and centering map not in marker latlng, but on center of marker and popup! The problem is that popup has dinamic content(loaded on click). The map size is full ...
1
vote
0answers
86 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 ...
1
vote
0answers
31 views

Leaflet - Enable/Remove popup on mousedown/mouseup?

I'd like to do as the title suggests and can get the popup to appear on mousedown with the following code, but mouseup doesn't close the popup: // Quick look at info on mouse hold ...
0
votes
0answers
17 views

Which are the differences between using javascript openlayer and gwt-openlayer API?

I am about creating a web app which should use openlayer API, but I would like to use GWT too. So I have the following questions: Is it the same to use GWT-openlayers API in terms of functionality ...
0
votes
1answer
49 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 ...
1
vote
1answer
33 views

ArcGIS API for JavaScript - Adding Point(s)

I need to add a single point, I am new to JS and ArcGIS API. I was looking for some code examples on how to create a point and/or a few other points (as needed) I can't use any additional ...
1
vote
1answer
34 views

How to get the TOC to update after adding a new Layer in the ESRI JSAPI?

I am developing an Web map with the ESRI's JavaScript API v 3.9. I am using the TOC widget available at http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109 The documentation ...
1
vote
0answers
28 views

Trouble adding tabs in identity popup JS API

May 28 Edit I have edited my code a bit and have come up with a fix to the tab container, however I am now having troubles getting my attributes to show when I click on one of my service layers. ...
0
votes
1answer
48 views

How to fire .NET code in my ArcGIS application from javascript?

So I'm developing a .NET desktop application for ArcGIS in VB. As a new part of the application I have developed an SVG / Javascript map as a 'loading screen' where you select your dataset to load ...
0
votes
1answer
34 views

How to forbid zoom map under scroll page?

I wrote code at ArcGis JavaScript. There is a map on web page at full display with a fixed height (400px) When i scroll-down page and cursor misses in zone map then browser works for zooming map, not ...
3
votes
1answer
70 views

Is there a way to know if an error occurred while loading a WMS layer, in OpenLayers 2?

First of all, I already asked this question in stackoverflow. I don't want to spam by asking again here. But I think the question fits better in gis.stackexchange. I am sorry for the replication. Feel ...
4
votes
2answers
2k views

How to calculate distance between two points with esri.geometry?

The function http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#namespace_geometry/esri.geometry.getLength should calculate distances between points. When I am trying to calculate distance ...
2
votes
1answer
907 views

Looking for an API that will autocomplete adresses, and split them up into parts

I'm kinda new to the whole GIS thing, and found that is necessary for onw of my web apps. It's come to my attention that some people don't know what a proper physical address looks like, and so I'd ...
0
votes
1answer
31 views

Passing RasterDataSource object to RasterData object in Javascript API?

I have a GP service that requires a RasterData object as input. The RasterData object should hold a RasterDataSource object, but I'm not sure of the syntax to connect these two classes. The API ...
0
votes
1answer
52 views

Map generation failing with Kartograph.js

I am trying to generate a very simple map using kartograph.js. But some how my code is not working. <html> <head> <script src="jquery-1.8.3.min.js"></script> ...
2
votes
2answers
531 views

Can I use leaflet to access a WMS service published as an OpenLayers javascript API?

I would like to add this layer to a site I'm working on that uses leaflet: http://116.240.195.134/vicmapapi/UserGuide.jsp The API itself is a javascript file based on OpenLayers: ...
1
vote
1answer
77 views

How do I get ArcGIS tiles to display a single layer when multiple layers are available?

I am using Bing Maps v7 to display layers from an ArcGIS server. The server displays multiple layers as one, but I would like to only display a single layer. Suppose a map service has the layers: ...
0
votes
0answers
37 views

Call a service web from a ComboBox using JavaScript

I want to call a web service and use it in combox for search. Here is the function that i used to call my service web: var xmlhttp = new XMLHttpRequest(); var url = ...
3
votes
1answer
185 views

leaflet choropleth map using dynamic value

I am doing a choropleth map using leaflet and JSON data. I got a clean tutorial in leaflet site. In that tutorial the used us-states.js JSON file where the choropleth was based on the ...
0
votes
2answers
52 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 = ...
0
votes
1answer
69 views

Modify the Zoom Buttons in ArcGIS.com JavaScript Application

I'm writing a JavaScript application to view web maps from ArcGIS.com. It is similar to the sample found on Esri's Samples page: http://developers.arcgis.com/javascript/samples/ags_createwebmapid/ ...
1
vote
0answers
53 views

How to combine three data extraction functions into one button?

I am looking to simplify my code. As of right now I have some code that allows users to extract GIS data in three different ways: Extract by drawn extent Extract by extent of the a county Extract by ...
0
votes
0answers
51 views

Using postgis functions in ArcGIS Server 10.2 for Layer Definition Query

I asked the previous question Using PostGIS functions in ArcGIS Desktop for Layer Definition Query? And got an excellent answer. However this covered ArcGIS Desktop. In 10.0 it seemed that if I got ...
1
vote
0answers
37 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
1answer
105 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 ...
6
votes
3answers
3k views

Accessing GPS data with JavaScript in real time

Is it possible to access GPS data in real time on a smartphone with JavaScript (without an android or ios application I mean)? Thanks
2
votes
1answer
790 views

Arcgis Javascript latitude and longitude convert to WGS_1984_UTM_Zone_36N

I am using Arcgis Javascript api. I have two points comes from Google maps like this x:-111.67095840000002 y: 32.7558935 I wanna use this points on my Arcgis map. My map spatial reference is using ...
0
votes
0answers
22 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
72 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 ...
1
vote
0answers
13 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 ...