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
1answer
3k views

How to use Google Default Pan/Zoom controls in openlayers

I am using Google maps version 3 with Openlayers,My question is how do you use the default google control for Panning and Zooming and not the default controls Openlayers panning and zooming(The dark ...
0
votes
1answer
2k views

How to change events in the Oncomplete Drag function in Openlayers

below is code that works for Openlayers drag function: drag = new OpenLayers.Control.DragFeature(polygonLayer, { autoActivate: true, onComplete: function() {alert('Are you sure this is the ...
0
votes
2answers
10k views

Openlayers How would i get a hover label over my polygon

make a hover/mouseover label for a polygon in Openlayers? I made a map with draw, delete and drag polygon function. Now I need to make a hover mouseover for this. How to get a hover label for ...
0
votes
2answers
4k views

How to delete polygon in Openlayers

I would like to delete my polygon in Openlayers after i have drawn it. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> html, body, #map { ...
2
votes
3answers
2k views

Openlayers get coordinates from polygon

please could someone help me and bless me with an example of how to get coordinates from a polygon in OpenLayers?
1
vote
1answer
3k views

Openlayers get coordinates of a circle vector after draw

I have made a openlayers map. I have made two features on the map. Navigate DRAW POLYGON I have made 40 sides to my polygon which turns out to be a circle. After I have drawn my circle I want to ...
1
vote
1answer
3k views

Loading a raster using Openlayers and Mapserver

I'm trying to load a raster into my browser using Openlayers. I can examine my WMS raster layer using OpenJump, but I'm not able to get it to load into my browser. My mapfile is as follows: MAP ...
1
vote
3answers
6k views

Understanding the polygon handler function in Openlayers

Using openlayers, I want to be able to draw one polygon on a map. After one polygon is drawn, I want an event to fire that stops any more from being drawn until a button is pressed. My current code ...
13
votes
4answers
3k views

Which framework is best to implement an application robustly, using ArcGIS Server JS API?

Over on the Esri forum, user Matt Moyles suggested that the approach used in the Esri JS samples isn't suitable for robust development of a web mapping application using HTML, JavaScript and CSS: ...
4
votes
3answers
4k views

How do I determine the center point of several features in OpenLayers?

I have several polygons being drawn on a map, usually representing a country or province or state. Depending on some chosen data, different regions may be selected, so what I was hoping is that ...
3
votes
1answer
797 views

How do I fire a function after all features have been selected by a box in OpenLayers?

I have a map rendering with Polygons on a Vector layer set up as features. I set up the features so they fire off a function when the feature is selected and this works fine. The issue I'm having is ...
6
votes
3answers
9k views

Creating a Bing and Google Tile Layer for Leaflet

I want to use the Leaflet Javascript Library to display both a Google and Bing Tile Layer, though I'm unsure how to construct the url. The documentation shows an example using OSM: var cloudmadeUrl = ...
1
vote
2answers
4k views

SelectFeature not working in OpenLayers

I'm still sort of new to openlayers, but I've been able to set up a map which reads in a KML, loops through the different regions contained therein, and draws those polygons on a vector layer overtop ...
12
votes
2answers
5k views

OpenLayers alternatives supporting more client-side features

I am considering different architectures for a system that will ideally use client-side rendering for point features and must be plugin-free. I have been using this application developed in response ...
0
votes
1answer
679 views

Purely client-side geocoding options for a webmap

I am creating a simple webmap that should be able to: Display external maptiles (any of the following: Cloudmade, Mapquest, Google). Overlay additional static layer in Geojson or KML format, that ...
2
votes
5answers
4k views

Event listeners after each plotting of a point of a Polygon Vector in OpenLayers

I am quite new to OpenLayers. I have a polygonLayer for users to draw polygon vectors. The plotting feature is working fine. polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); ...
8
votes
3answers
2k views

Mobile offline mapping and editing of shapefiles

I've got a client that wants to create a mobile app that can view and edit shapefiles stored locally on the device to enable it to work offline. There is a possibility of converting the shapefiles to ...
2
votes
1answer
750 views

ESRI - Polyline insertPoint issue (JS 2.5 API)

I am trying to basically draw a path on an esri map. with circles like so, but when I call Polyline.insertPoint it doesn't show the new segment: I keep adding points as time progresses. My ...
1
vote
2answers
834 views

How to create a custom Balloon for Google Earth?

I just came across one question related to google maps in stackoverflow. Google Maps: How to create a custom InfoWindow? I really like the popup that they mentioned in the question and the image is ...
2
votes
5answers
9k views

Why is this ExtJS combo box not filtering? [closed]

I am trying to place a combo-box in the top of my web application which will search an internal WFS from Geoserver. I am using the combo-box so I can have the "type ahead" functionality which I think ...
11
votes
3answers
2k views

Where can I find country borders data in human-readable format?

I'm trying to obtain some data representing the borders of all countries in the world. This data doesn't have to be very precise, it is to draw the countries on a computer screen. I did a bit of ...
5
votes
1answer
4k views

How to create a movable point in OpenLayers?

I have the following code: function mapCreate(lon,lat){ map = new OpenLayers.Map("map1"); var osm = new OpenLayers.Layer.OSM(); vectors = new OpenLayers.Layer.Vector("Vector Layer"); ...
9
votes
2answers
2k views

How to add a layer to SelectFeature without losing existing selections?

I'm using an OpenLayers.Control.SelectFeature for selections on multiple layers. However, when I add a layer using setLayer(), my selections on the other layers are lost. Anyone know how to work ...
14
votes
8answers
11k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
1
vote
4answers
1k views

Map in an iFrame - open hyperlink from infoWindow in the calling page

I've got a Google Map being served inside an iFrame on a page (eg xxx.com/PageWithMap.html) The code for the Google map sits on another domain (eg yyy.com/MapCode.html) So it looks like this on ...
0
votes
1answer
735 views

How to highlight track in KML on hover with OpenLayers

I have KML layer with multiple tracks and I would like to highlight them individually on mouse hover. I tried to implement this like in the example found in OpenLayers examples, but couldn't get it ...
6
votes
1answer
411 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 ...
5
votes
2answers
671 views

How to time function calls in OpenLayers?

We have an existing application that has a function that wraps the OpenLayers.Layer.Vector constructor, which gets its layer info from a KML source over http. Once this function completes, I need to ...
2
votes
0answers
409 views

GeoPDF Library for .NET or JavaScript

Anyone know of any open source .NET or Javascript libraries for creating GeoPDFs? I know of QuickPDFLibrary, but i'm preferably looking for something open source. I want to programmatically generate ...
4
votes
1answer
2k views

Changing the line color of a marker box using OpenLayers

I'm trying to figure out how to change the line color of a marker box in openlayers. I've been learning from the following example: <!DOCTYPE html> <html> <head> <meta ...
4
votes
1answer
501 views

Why is my polyline on the wrong bearing?

I am trying to overlay duplicate segments of polylines on a map via javascript. I am using latlon.js and geo.js from here The idea is that a user can input the distance they have travelled and when ...
1
vote
1answer
1k views

Invalid filter when using MapServer as a WFS

I'm trying to use Openlayers and Mapserver to display a shapefile. My HTML file is as follows: <html> <head> <title>OpenLayers Example</title> <script ...
2
votes
2answers
206 views

Is there a GroupRenderer in ArcGIS for javaScript?

Is there a GroupRenderer or similar functionality in ArcGIS for JavaScript? What I would like to do is to show PictureMarkers with a label showing an attribute on the Graphics object.
2
votes
2answers
2k views

Querying MapServer using WFS functionality

I'm trying to display a shapefile using OpenLayers and Mapserver. Instead of overlaying it as a png, I want to return a vector, in this case a KML file. My HTML file (located in the same folder as ...
3
votes
1answer
856 views

Why is Openlayers KML-layer undefined when using permalink

I am working on Openlayers to dynamically load KML tracks on map. I want it to load filtered KML everytime map is moved or zoomed based on viewport and zoom level. I got it working with code below, ...
6
votes
4answers
9k views

How to display mouse position as tooltip in OpenLayers?

I want map coordinates as mouse over effect in OpenLayers. I am using the following code, however it is showing pixel coordinates: map.events.register("mousemove", map, function(e) { ...
11
votes
4answers
2k views

Options for displaying PostGIS rasters in OpenLayers

This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in ...
7
votes
1answer
1k views

How do we add a custom basemap in ArcGIS.Com that can be used in Javascript API?

It's possible to add a layer as a basemap in ArcGIS.com by checking the check box use as baselayer: But when I consume the map using: var mapDeferred = esri.arcgis.utils.createMap("<guid>", ...
1
vote
1answer
386 views

Finding the max. zoom level containing imagery at a point in Google Maps?

Is there a way to find the maximum zoom level containing imagery at a point in GMaps? I'm wanting to automatically zoom my map in as much as possible when a user chooses a point, but sometimes there ...
12
votes
3answers
4k views

Open source alternatives to Google's StreetView engine?

I am looking to create an open source javascript app using either Leaflet or OpenLayers. Is there any way to implement panoramic views (similar to Google's StreetView) into either of these, or any ...
4
votes
1answer
4k views

How to calculate Bearing between two GPS points

The following returns 150 degrees using C# converted from JavaScript Bearing formulas, but Google earth returns 210 degrees for the same values. The broken code is GetBearing() but I've also included ...
6
votes
1answer
2k views

Add a OpenStreetMaps road data layer on Google Maps API v3

I've successfully embedded a Google Maps API v3 map on my site, and added OpenStreetMaps (OSM) as the base layer. Is it possible to use Google's tiles as the base layer, and then overlay street data ...
3
votes
1answer
2k views

How to draw a line in OpenLayers?

I would like to draw a line between few GPS coordination. I tried to use OpenLayers.Geometry.LineString for that, but it uses a OpenLayers.Geometry.Point. Is there any function in OpenLayers that ...
1
vote
1answer
938 views

Toggling feature visibility in Openlayers + GeoExt

I'm setting up a small web mapping application using PostGIS + mod_tile + FeatureServer + OpenLayers + GeoExt, each of which I'm learning as I go. In addition to the base layer, I've pulled in a few ...
1
vote
1answer
308 views

Connecting geocoded point to an identify function

I am using the esri javascript api to make a web map. I need to use an address locator to geocode a point and then depending on where that point lands information populates a side panel. I am assuming ...
6
votes
2answers
4k views

How to navigate the REST endpoints and retrieve Field information programatically

I'm adding a Dynamic Map Service to an ArcGIS Server JavaScript API map, and I need to get hold of each component layer and its fields, so I can run a query. See the sample ArcGIS Server services ...
6
votes
2answers
826 views

Help needed using REGEXP for address string parsing

Using JavaScript, my aim is to create an "intelligent" address search function with a single textbox (rather than separate textboxes for house number, street name, street type, suburb, etc). I'm ...
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
160 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
9k 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 ...