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

learn more… | top users | synonyms

5
votes
3answers
145 views

Guidance when to style your features in Tilemill vs. Leaflet?

I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine ...
0
votes
1answer
231 views

set infoTemplate for various graphics in graphics layer in loop

I am successful at getting an info window pop up on the event click of a marker on a map. Now, what I'm having trouble with is passing unique information for each graphic in the loop to the individual ...
0
votes
0answers
36 views

Radius based search with Leaflet maps

Using leaflet I have created a simple map, played around with markers (adding/removing) and have added some GeoJSON data polygons etc. I now need help with implementing a radius search. For example I ...
0
votes
0answers
19 views

Creating a layer switch Google Maps Api v3

I have generated a basic webpage with Visual Studio 2012 that displays a Google Map. My goal is to add multiple KML layers from my Server onto the Google Map, BUT, i want to be able to have a sort of ...
0
votes
1answer
29 views

Syntax for using ArcGIS for Server layer with WMS service?

I am having some issues with getting an image/png format from an ArcGIS Server. The console returns: Resource interpreted as Image but transferred with MIME type application/vnd.ogc.se_xml: ...
0
votes
0answers
25 views

Dojo Stacked Columns Chart for JavaScript ArcGIS Web Map Pop

Anyone know how to use the the StackedColumns chart in dojo for ArcGIS JavaScript API? I need to add one to my popup window. I can only find the documentation below: ...
1
vote
1answer
37 views

ESRI Javascript API QueryTask error handling

I'm struggling to find the proper way to handle errors in a QueryTask. Particularly if the user clicks outside the feature layer. My current QueryTask looks at a field (bare_earth) populated with ...
3
votes
1answer
647 views

How to highlight on mouseover without wiping out select control

I am trying to highlight features of a vector layer as the mouse moves over them. I can make this work. I'm also trying to make the features selectable and have a popup box when they're clicked. this ...
0
votes
0answers
19 views

OpenLayers vector feature not being highlighted

I'm trying to highlight a clicked area of a layer using a vector: var highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", { displayInLayerSwitcher: false, styleMap: mystyle ...
0
votes
0answers
25 views

OpenLayers 2.13.1, how could I make a click, get coordinates, send it to geoserver function?

I am trying to make this very simple function, at the moment I am quite stuck when I have to place the markers as start/end points. I would like to add a marker as start and another as end and then do ...
2
votes
1answer
117 views

Openlayers map WMS stretched by latitude

I am working on a small javascript application for displaying map with WMS layers from 2 servers. The problem is, that image is stretched by latitude, it is wider, as it should be. This is is how it ...
2
votes
2answers
141 views

Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for ...
0
votes
1answer
115 views

Browse (add/remove) ArcGIS Server Services (Layers) from the ESRI Javascript API viewer

I am quite new to the Javascript API. I am not if there is a widget that does what I would like but I am trying to create a web map that allows the users to choose/add/remove layers located on our GIS ...
0
votes
2answers
341 views

Display photo in GeoExt popup

I have point feature with name PointPhoto. This feature have attribute: id area PhotoPath Now I am using GeoExt popup to display this attributes, but I cant find a way to display image from ...
0
votes
0answers
13 views

Get Web Map Layer Field Value for If/else Statement

I've been trying to read through the ArcGIS JavaScript API but can't find what I want. I have a web map on my page that is based on my my map stored on ArcGIS online. I want to create an if/else ...
0
votes
1answer
32 views

ArcGIS API for Javascript - InfoTemplate on a polyline

I have a web map with a few points and a single polyline. I have infoTemplate(s) attached to the points and tried to replicate this to the polyline however, I can't get it to work. I looked on the ...
0
votes
1answer
32 views

ArcGIS Javascript API Editing - Create Feature from Geometry Object

I'm interested in passing a geometry object with certain attributes to an exposed feature class for committed edits. Essentially, I want to manually create a new feature without the template pane or ...
0
votes
1answer
18 views

Kml not overlaying onto Google Map

I created a basic dashboard with MVC 4, visual studio 2012, The dashboard displays a Google map. Here is an image of the dashboard: My intention is to be able to take this Kml file: And ...
1
vote
1answer
151 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); ...
4
votes
1answer
210 views

How to generate xml for use with geoxml3

I have a kml and shp I would like to convert to an xml to use with geoxml3. How would I go about doing such a thing? the xml I gen should look something like this: <?xml version="1.0" ...
1
vote
0answers
39 views

Openlayers Map Marker / Popup Behaviour Mobile Devices

Quick overview. i am creating a site with a map using Openlayers and Open Street Maps. User clicks on map and fills out a popup form and submits form. Markers appear at lonlat points where map was ...
0
votes
0answers
7 views

WMC as a permalink

I'm using the permalink control in openlayers but there are limitations in the way it handles map's context. For example if users load an external WMS layer it won't appear in the permalink. WMC has ...
0
votes
3answers
624 views

How to add png image with esri javascript api MapImageLayer Class?

I have a png image that we host that I need to resize and overlay onto a map at specific gps coordinates. Would this be an image class? I can't seem to find any examples that match up with my needs. I ...
1
vote
2answers
62 views

Leaflet highlight feature by ID

I have a map application where: I load polygons as GeoJSON objects I draw all polygons in a single layer I highlight a polygon on mouse hover What I need to do is the following: on mouse hover, I ...
116
votes
16answers
42k views

How do various JavaScript mapping libraries compare?

I am working on a web-based mapping system and I'm trying to figure out the best/most appropriate library to use. There are a few of them about and they each have pros and cons. Even after trying a ...
0
votes
1answer
41 views

Reproject WKT Polygon with Javascript

I have a polygon in WKT in EPSG:4326: polygonWKT = 'POLYGON((13.215179443359373 52.588032137196755,13.42803955078125 52.592620721000365,13.454132080078125 52.46897854656702,13.347015380859375 ...
1
vote
1answer
28 views

How do I cycle through the available Overlays and Base Layers using OpenLayers

I would like to have my map cycle through the display of loaded overlays and base layers using Javascript or jQuery. I would like to do this with a delay of 5 seconds between cycling. Does anyone ...
6
votes
1answer
629 views

ArcGIS JS API Relationship Queries

Has anyone ever put the results of a RelationshipQuery() into a map.infoWindow that's been replaced with a dijit.popup? Here's the workflow: User clicks a point, and all identify results are put ...
0
votes
1answer
36 views

CartoDB or Leaflet.js get coordinates of point clicked?

Using CartoDB or Leaflet.js is it possible to retrieve the coordinates of the point on the map clicked when opening an infowindow?
3
votes
1answer
721 views

Trouble with accesing API code: “ReferenceError: esri is not defined”

I am developing a web map application in the ArcGIS API for Javascript. I two have ArcGISDynamicMapServiceLayer layers that I am trying to run a simple query task on. The code I am using works in ...
0
votes
2answers
54 views

Simulate a mouse-click inside an ArcGIS Online JavaScript Application

I have a JavasScript application consuming an ArcGIS Online Web Map. I want to open a default popup at a specific coordinate. Is there a way to simulate a mouse-click at that point, or a better ...
1
vote
1answer
44 views

Basemap Widgets

I am looking for a fancy Basemap plugin to use with the ArcGIS Javascript API. Something along the lines of the Basemap Widget (see image below) available in the Flex Viewer would be great. Anyone ...
5
votes
1answer
366 views

Why do ArcGIS Desktop 10 HTML popups give JavaScript/HTML Error?

Using ArcMap 10 Desktop HTML Popups. The issue I am having is that the html < select > elements aren't working - you can select it and use the arrow keys to navigate through(up/down) the list but ...
1
vote
0answers
22 views

How to offset/displace overlapping lines in a web map?

I have a dataset of points representing a To/From status - something like distribution centres and delivery addresses. When the user clicks on a point I'd like to show the relationships between this ...
1
vote
1answer
161 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
0
votes
1answer
21 views

Accessing organisational webmap using downloaded Basic Viewer of ArcGIS Online?

I have downloaded the Basic Viewer of ArcGIS Online (AGOL) to my web- and arcgis server within my organisation. Now I want that copied basicviewer to access a webmap on agol that I made accessible to ...
-1
votes
1answer
139 views

Do map services go stale? [closed]

This has happened several times over: I publish a dynamic map service, and then use the JavaScript API to allow the user to select features to obtain attribute information as well as to zoom to ...
1
vote
1answer
1k views

OpenLayers and GeoJSON - problem projecting EPSG:4326

I'm trying to project some GeoJSON data but it ends up at 0,0. I've looked at other posts and tried those solutions to no avail. Can anyone help? Here is the code: <html> <head> ...
0
votes
1answer
27 views

Using a tree menu beside openlayers

Is there an aplication to add tree menu for the map showed with openlayers? I mean show a map on my site exactly how is showing in google earth for example, my layers organized in folder/subfolder, ...
1
vote
0answers
228 views

How can I get all the latitude, longitude coordinates/points inside a rectangular polygon drawn in google maps?

Google maps lets you obtain a valid address by clicking on houses or buildings one by one, but it would be much easier if you could draw a polygon on the map and get a list of all valid addresses ...
0
votes
1answer
44 views

Adding controls to OpenLayers maps - is this good code

I have multiple OpenLayers maps, each map gets a subset of controls that I use across all maps. In the past I have added controls in the traditional way, for each control. var control = new ...
3
votes
4answers
4k views

How to load external geojson file into leaflet map

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an ...
0
votes
0answers
656 views

Plot poly-lines between few points in D3+Polymaps

I would like to create polyline on the click of the mouse. I have 4 circles 3 with radius 2 (Lets name it as B,C,D) and 1 with radius 8 (Lets name it as A). Now when I click on the circle A, poly line ...
1
vote
1answer
651 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 ...
1
vote
2answers
223 views

How to convert Shapefile to TopoJSON with grouping neighbor shapes by some criteria

I have a shapefile with countries, which I convert to GeoJSON using ogr2ogr and then converting that json to another TopoJSON, using topojson command-line tool. Everything works like charm, but now I ...
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
918 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 ...
1
vote
1answer
474 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 ...
0
votes
0answers
39 views

Geocortex Viewer: Running a Workflow with Arguments

I have a webpage with the Silverlight Geocortex Viewer embedded in it. Through the browser's developer console, I can run commands through it such as ...
0
votes
2answers
47 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 ...