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)

3
votes
1answer
5k 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
665 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
1k 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
292 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
338 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
595 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
415 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
2k 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
6k 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
563 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 ...
11
votes
4answers
12k 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 ...
127
votes
16answers
46k 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 ...
14
votes
6answers
7k 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
723 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
3
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
895 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
590 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
925 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
973 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 ...
0
votes
1answer
193 views

In what form should make requests to geoserver gml file from javascript?

In what form should make requests to geoserver gml file from javascript?. I have made this question, but neither on nor XMLRequest jquery and have downloaded some of geoserver, geoserver values ...
5
votes
1answer
3k views

Find bounding box of a Google map

Is it possible to get the bounding coordinates of a google map that a user has zoomed to using Javascript? I see that it can be done using the Google App Engine but I don't know if is possible using ...
2
votes
1answer
736 views

how to download a file from geoserver gml from a url using javascript?

how to download a file from geoserver gml from a url using javascript? I'm doing a web application with javascript, but I could not download files from geoserver, the url given entry does not bring ...
4
votes
2answers
650 views

Is there an existing way to do linear referencing in ArcGIS JavaScript API 2.1?

First of all, let me specify that this is for the JavaScript API 2.1 or later only, not ADF/Google/Virtual Earth/Silverlight/Flex or any of the other extensions. We've been creating geometry from a ...
7
votes
1answer
1k views

Adding Panoramio Photos To An OpenLayers Map

I have a pretty well integrated OpenLayers map that I want to add photos from the Panoramio API to. Unfortunately, it seems both API's are under documented on this subject. I found one great tutorial ...
4
votes
1answer
1k views

How to set map rotation in ArcGIS Javascript API?

I've created a web map using the ArcGIS Javascript API, but I need my map to have a fixed rotation of 1.76. The street grid of the map doesn't totally align with the cardinal directions, so it looks ...
4
votes
1answer
2k views

Group Layers Do Not Display in GeoExt LegendPanel

I have a GeoExt.LegendPanel which is working just fine for layers which are not grouped. However, the grouped layers do not show any icon in the LegendPanel. I have tried to create the group layer ...
9
votes
3answers
1k views

Best ways to embed dynamic maps into PDF files

Working in consulting, I found that sending clients PDF file with my embedded maps is one of the best ways to achieve a wow-effect from them. The latest pdf file formats all support the layers feature ...
6
votes
2answers
275 views

Randomly Generate Streeview Point without GIS in country

I'm interested in pulling street view data at random within a country. I can only figure out how to generate a point within a bounding box. Often it pulls data from nearby nations. I'm using a GIS ...
0
votes
1answer
483 views

Checkboxes turn off layers within a mapservice, and I want them to make the layers visible?

This webmap project I keep working accesses mutilple layers within a couple different mapservices. I would like to learn how I can load the layers without them drawing. I've recently incorporated ...
3
votes
4answers
1k views

why is my findTask Not working correctly? can someone please look at my code and see if I have missed something?

My findTask is from the SAMPLE on ERSI's website http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_map_datagrid.html I have incorporated into the project I am working on. I've ...
2
votes
1answer
960 views

How do I set options for individual layers within an ESRI Mapservice?

I've been working on an internet mapping site to include ESRI basemap layers, and in-house mapservices broken out by layer.. I have gotten that far.. I am also still fairly new to javascript..so, ...
4
votes
1answer
1k views

slow to draw mapservices after access featureLayers within an ESRI Mapservice using Javaascript API

I am working on creating an online map using ESRI mapservices as a basemap and existing mapservices on our arcserver.. The problem I am running into is that the mapservices we have here are really ...
9
votes
2answers
2k views

Restrict pan and zoom in ArcGIS Javascript API?

I'm creating a web map of a university campus. I have the map functioning, but I don't want to be able to pan off of the basemap, into whitespace. Do you know of a function that will auto-pan the ...