Tagged Questions

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
2answers
410 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
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
554 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
11k 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 ...
123
votes
16answers
44k 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
705 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
891 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
575 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
911 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
942 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
725 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
628 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
986 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
262 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
468 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
905 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 ...
2
votes
2answers
1k views

I would like to access specific layers in an ESRI Mapservice and toggle them on and off

I have access to number of ESRI Mapservices and would like to be able to access specific layers within the mapservices in my online map application I am working on creating with the ESRI Javascript ...
4
votes
1answer
1k views

OpenLayers Style Question … not working in IE

I'm trying to use OpenLayers to produce a map I'm using the following to style a layer in the map. It seems to work fine in Firefox but I get javascript error in IE 'symbolizer' is null or not an ...
5
votes
4answers
4k views

Google maps kml and polygon eventclick error

I have a google map polygon kml file that I am loading on a google map. When I click on the polygon, I draw a line from that polygon to places on the map. To do this I am using the code: //Add KML ...
2
votes
1answer
381 views

Has anyone successfully made a FeatureLayer from a view in DB2 and ArcSDE 10?

Lately it seems like every new ESRI feature fails for me - I must be cursed. I'm testing the use of a FeatureLayer to see if helps display and query features using the JavaScript API 2.0. This layer ...
4
votes
2answers
5k views

Removing polylines from google maps

I have a point where a Gpolyline line is drawn from a marker to another point. After I click on it a second time, I want to remove the polyline. How do I remove the line after clicking on the marker a ...
5
votes
6answers
446 views

Is anyone using JSONP in Web mapping applications to get around the browser same origin policy?

Javascript based Web mapping apps that use ajax requests to get data from a server are limited by the Same Origin Policy to only request the data from a server in the same domain (subdomain and port). ...
7
votes
2answers
10k views

OpenLayers: Use scales instead of resolutions

Venturing around in the OpenLayers source code, it seems like everything related to zoom-levels is done using resolutions. Fair enough since this related directly to screen space. I would like ...
1
vote
2answers
527 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 ...
10
votes
3answers
327 views

What's a good library for displaying many small maps on a web page

I would like to create a visualization on the web similar to the following: http://namemapper.babynamewizard.com/namemapper/ Are there any good libraries for doing this? Is OpenLayers light-weight ...
3
votes
1answer
903 views

Interacting with the Map after selecting a button/tool

I am using the ESRI Javascript API 2.0 and Dojo dijits. Does anyone know how to wire up a dojo button (or toggle button) in a toolbar to a mouse click event on the map? I want the user to have to ...
2
votes
2answers
898 views

Showing a select or hightlighting a point feature in AGS using Javascript

How would you go about "selecting/hightlighting a feature" in the map control when a user clicks on a point in the map - all via ADF Javascript. I know it can be done server side with a selection ...
1
vote
2answers
4k views

How to grab user's mouse click (coordinates) in Javascript

I am just getting to grips with using ArcGIS Server 9.3.1. I am developing in .NET with a very basic Web app in C# - it has the standard ESRI web ADF ASP controls in the web page (Default.aspx) ...
18
votes
6answers
1k views

What embeddable web-based maps exist?

Some of the ones I'm familiar with (in no particular order): Google Maps (http://code.google.com/apis/maps/index.html) Bing Maps (http://www.microsoft.com/maps/developers/) Yahoo Maps ...