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)

2
votes
5answers
2k views

Convert geographic coordinates to UTM zone 29N with Javascript

I have an issue converting lat longs to UTM with the ArcGIS javscript API. Lets say that I have a map, based on the UTM zone 29N, also known as WKID 32629. I have a known set of coordinates from a ...
4
votes
1answer
159 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?
7
votes
3answers
8k views

Draw a point with ArcGIS Javascript API

I am currently trying to draw a point with the ArcGIS Javascript API. Pretty much like this example, http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_draw.html, except the ...
2
votes
1answer
1k views

ArcGIS Server js api - buffer query against polygons and not points

I'm using the below sample and i want to change the queried results from points to polygons http://help.arcgis.com/en/webapi/jav...ry_buffer.html Probably very simple but cant get my head around ...
3
votes
1answer
523 views

Identify with Layer Toggling

I have spent some time reading the numerous threads about setting the identify task to work with layer toggling and I seem to have it working properly except for one small issue. The identify task ...
3
votes
1answer
246 views

Map and onKeyDown event

I have a web page with a map and search field. Something like Derek's "beer's finder" When I type a search request I somethimes use arrows to fix something. But if mouse is over the map, then I can't ...
3
votes
2answers
2k views

Open Layers Zoom On map single-click

I am trying to zoom into a location on a single click. How can I zoom towards the point on single click? I have tried using OpenLayers.Control.ZoomIn and adding a click handler, but for some reason ...
3
votes
3answers
6k views

How to dynamically update a KML layer in OpenLayers 2.10?

Arguably, this is a easy question for you guys GIS expert. Here is the question, how to outsource a dynamic KML file using JavaScript in OpenLayers. I want to refresh every 7 seconds. Below are ...
7
votes
1answer
1k views

Browser support for ESRI ArcGIS JavaScript API (v2.4)

Can anyone give me information or a good pointer on browser version support in the ESRI ArcGIS JavaScript API v2.4? I can't find much in their documentation beyond changes in support for specific ...
2
votes
1answer
234 views

LinearRing getVertices implementation

I'm fairly new to OpenLayers so please excuse me if this is an ignorant question. I'm curious why the LinearRing getVertices implementation getVertices: function(nodes) { return (nodes === true) ...
4
votes
2answers
2k views

Identify all layers on the map without pre-designing the infoWindow

This applies to the ArcGIS Server JavaScript API 2.4. The Identify Task sample shows how IdentifyTask can be used to find features in multiple layers, as specified in the IdentifyParameters: ...
3
votes
2answers
3k views

OpenLayers PanZoom control customization

I try to customize PanZoom control and have some questions. 1) What are OpenLayers.Control.PanZoom.X and OpenLayers.Control.PanZoom.Y constants? 2) Method "draw" takes "px" argument as input. I can ...
2
votes
2answers
169 views

Where can I deploy a JavaScript app for collaborative testing?

I'm developing a new ArcGIS Server JavaScript application, and I'd like to show the progress to the client, so he can provide feedback as I develop it. The application consists of an Index.html file, ...
3
votes
1answer
940 views

Proj4js objects not readyToUse

I am using Proj4js to transform between WGS84 and a local Swedish grid RT90 (EPSG:2400). It works in FF, but in IE the Proj objects often is not readyToUse when I need them to. I use this code to ...
3
votes
1answer
4k views

SelectFeature with Double-Click

I have the ability to select features on the map with a click using OpenLayers.Control.SelectFeature. How can i add a double-click handler to that? I have tried modifying this code to suite my needs, ...
6
votes
1answer
2k views

Is it possible to use esri.dijit.Popup for editing

In the new arcgis js api ESRI added new nice infowindow - esri.dijit.Popup. We can use it this way: //create a popup to replace the map's info window var popup = new ...
1
vote
1answer
2k views

removeAllFeatures + destroyFeatures too much?

I'm doing the following in my code and am wondering if it's too much or is there any benefit? myLayer.removeAllFeatures(); myLayer.destroyFeatures(); Reference: ...
4
votes
3answers
2k views

Change the size of an OpenLayers.Control.OverviewMap

I create my OpenLayers.Control.OverviewMap with a given size but I would like to change it when certain conditions are met. I have tried two approaches with no luck... My first try was just changing ...
2
votes
2answers
641 views

Does the ArcGIS Javascript API support multiple map service urls per layer?

I've called tilecache from OpenLayers in the same manner as the example below. Is it possible to do something similar with the ArcGIS WMS map layer? var urlArray = ...
9
votes
4answers
991 views

what is the right way to delete all features from featureLayer

I have a featureLayer and I don't want to kill it and create another one. I want to delete all features from the current featureLayer. I found that I can use applyEdits method but in order to use it I ...
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 ...
0
votes
2answers
286 views

ArcIMS - Active layer update

I'm trying to change the active layer in ArcIMS from the default top position to index 2 in the TOC. The TOC has 3 grouped layers, but it is the first grouped layer that I want the active layer to be ...
8
votes
2answers
4k views

How to cluster Google Maps kml overlay

I have several thousand markers stored in a kmz file that I load into a Google Maps (v3 API). I've looked around to find a way to cluster the overlay data, but to no avail. MarkerClusterer looks ...
5
votes
1answer
2k views

How to get the intersecting polygon of two polygons? (using JSTS intersection)

I want to intersect two polygons within an OpenLayers layer. I found the JSTS library, which should be able to intersect two polygons, and return the new created polygon of the intersection. The ...
3
votes
4answers
1k views

best browser framework

Dear all, I am building a GIS system. All my data is stuffed into geoserver. I need to have a front end able to do the following: Select one or several layers from geoserver and show it to the end ...
1
vote
1answer
329 views

How to project the result of a QueryTask in ArcGIS Javascript API?

I have created a web map that displays point features based on a given date range. Our current projection is Oregon State Plane South. My boss wants me to change the map to use a Web Mercator ...
0
votes
2answers
556 views

How to load WMT_MS_Capabilities using Javascript

I would like to load and parse an WMT_MS_Capabilities using Javascript. I have unsuccessfully tried severaly ways. I am trying with this file but I always get this error: uncaught exception: ...
2
votes
2answers
408 views

Control Map Pan per checkbox

i want to add the functionality of switching the option to pan the map and put it in a checkbox. But im not quite sure how i can do that. The reason I want to do this is: I have a layer which ...
4
votes
1answer
2k views

How to handle add feature event in the FeatureLayer/Editor

I use a FeatureLayer created from the featureCollection. I also use esri.dijit.editing.Editor to add a feature to the map. Every time feature has been added to this layer I want to send it to my ...
5
votes
1answer
1k views

How to change a FeatureLayer's symbols?

I did this: dojo.connect(featureLayer, "onUpdateEnd", function() { var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255])); ...
11
votes
9answers
2k views

What is a good Javascript web API (preferably open) for building web maps that require little/no maintenance?

I have recently volunteered to make a web map for a local non-profit. The map will be pretty basic. It needs to display Lane county, Oregon split into multiple districts, with a "central office" ...
1
vote
1answer
2k views

Feature Layer with ONDEMAND mode

I can't understand how to display all features from the feature layer. In the code bellow I specified 2 features in the layer and set in feature layer's mode to esri.layers.FeatureLayer.MODE_SNAPSHOT. ...
3
votes
3answers
5k views

FeatureLayer creating in javascript ArcGIS API

I got the sample called "Feature Layer with ONDEMAND mode" in the ArcGIS for js resource center. This example just adds layer with rivers to the map. I want to use my own features instead of using ...
1
vote
1answer
538 views

How to query all points within the current map extent

First post - apologies if it's a simple question! I am basically looking to have a JS API service which will populate a datagrid with all of the points visible in the current map extent. As a user ...
10
votes
4answers
10k views

Overlaying lat/lon points on Google layer in OpenLayers

I'm stuck adding a vector point in lat/lon on top of a Google layer in OpenLayers. The point is moving when I pan the map. This doesn't happen if I replace the Google layer with a layer in WGS84. How ...
3
votes
1answer
1k views

Display XY after Button Click

I am creating a map that will generate an XY coordinate based off the location that a user clicks. I only want this location to be generated after the user clicks a button to enable the draw toolbar ...
119
votes
16answers
43k 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 ...
4
votes
2answers
2k views

JavaScript library to read data from a WFS server?

Is there a JavaScript library available to read data from a WFS server?
0
votes
6answers
2k views

Is it possible to query a MySQL database using the results from map.getBounds() with Google Maps API v3?

I have a MySQL database that contains a large number of polygons, one for each district on a map. They are all quite complicated and it's unrealistic to simply load them all at once. I've looked into ...
13
votes
6answers
6k views

Pure JavaScript Library for Geometry Operations

Does anyone know of a pure JavaScript library for doing geometry operations such as buffer, union, intersects, etc? I want to play with doing these operations in the browser. It looks like ...
1
vote
2answers
691 views

ToC Context Menu Move Layer Up Down

Similar ESRI arcgis.com can anyone give pointers on how to move layer up/down? And of possible include the context menu. Update:Pardon me, Using Javascript API Cheers, blueRace
2
votes
2answers
1k views

How to trigger a hover event for map graphics in ArcGIS Javascript API?

I want to trigger an event when the user hovers over a geometry that they drew. I know how to set up hover events for DOM objects, but not for graphic elements within the map window.
0
votes
1answer
887 views

Openlayers toggle Marker controls and update information in external form fields

I am setting a form (for multiple addresses) where users can click on map by creating a marker for each address they want to input. Users can only create one marker per address and once the marker has ...
3
votes
4answers
560 views

ESRI Javascript API: Return to the Map Extent you were at when you use browser back button

Can anyone give me some pointers (code would be helpful) on how to go back to the extent a user was at after they have navigate away and clicked the back button? So I'm viewing a map at X extent I ...
3
votes
2answers
895 views

How to Display Point from Form

For the last few days I have been trying to come up with a way to display a point on a map from a coordinate pair entered into a form. I began with the sample below and then added the formToJSON ...
3
votes
2answers
1k views

Zoom after apply CQL_FILTER in OpenLayers

I apply a filter to one layer and works nice. I want to maximize the bounds where I applied the filter, like this: // mapbounds = array(minx,miny,maxx,maxy) activeLayer = new OpenLayers.Layer.WMS( ...
2
votes
1answer
1k views

JS relationshipQuery not returning multiple selected features

This is my first time posting a question here. I am working on a map application using ArcGIS Server 10 with Javascript API 2.1 and I am trying to figure out why I cannot return multiple selected ...
4
votes
3answers
5k views

Using the Proj4js library to convert from Google Maps to projected values

I'm using the proj4s javascript library (based on advice from this question I asked previously) to convert lat/long values on my webpage. This page receives the lat/long values from google maps and ...
3
votes
3answers
4k views

Problems with ESRI JavaScript API

I'm having some problems to get started using the ESRI JavaSript API. I have a test map service published on my notebook but I can't get it to display. I don't have problems with esri hosted services, ...
5
votes
3answers
900 views

toolbars.Draw: Clear last point when a new point is clicked.

I am creating a map that will provide coordinates when a point is clicked on the map. I want to have a graphic provided on the clicked location so I am going to using the drawing functionality as ...