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)

1
vote
1answer
2k 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> ...
3
votes
1answer
1k views

Google Maps Decodepath change variable name

I have this code: var directionsService = new google.maps.DirectionsService(); var request = { origin : start, destination : end, travelMode : ...
0
votes
1answer
903 views

Geojson multipolygon doesn't work with Leaflet bindPopup?

I have polygon and multipolygon data in Geojson format and when I try to bind popup for polygon, it works perfectly, and when I try to bind it for multipolygon, it doesn't work. Is that some Leaflet ...
2
votes
1answer
1k views

Is it possible to implement Geofencing in Openlayers?

We were planning to develop an application using Openlayers, which can display the incoming GPS signals as markers and create alerts , if the markers( positions) are outside a particular zone. Is ...
0
votes
1answer
176 views

How to create customized side control bar in OpenLayers?

I could create a simple map using OpenLayers. But I want to have a customised side control bar. The one I created: The one I want to create:
2
votes
2answers
1k views

How to make editable polygons in Google Maps?

I've just recently started learning Google maps, JavaScript, etc., and have a few questions about a project that I'd like to do. I'm wanting to take some ESRI shapefiles, convert them to KML, and then ...
0
votes
1answer
179 views

“TypeError: this.options is null” in OpenLayers.Protocol.HTTP‏ [duplicate]

I'm using OL 2.11 with GeoExt 1.1. After testing and modifying this GeoExt example: http://geoext.org/lib/GeoExt/widgets/form/FormPanel.html, I had problems with destroying and reading the new ...
4
votes
1answer
398 views

Export KML to SHP in Javascript

I need my Javascript browser application to convert/export KML documents into ESRI shapefiles. Is there any JS library that can do it? I tried googling, but no answers so far (at least, not in ...
1
vote
1answer
770 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 ...
3
votes
2answers
447 views

How does Mbtiles store raw image data in the tile_data field?

Looking at the MBtiles spec, the tile_data field of the tiles table is just a blob of a tile image. With this information, I expected to be able to take a data URI, string it of everything except the ...
0
votes
0answers
565 views

ajax not working with postgresql

I know is a silly question but I thought I should ask since you guys know more about postgresql. Sorry for being analytical, but I think its the only way to make my question clear. I'm using ...
2
votes
1answer
170 views

How to stop features to redraw unwillingly in OpenLayers

I have a problem where when editing features from a wfs vector layer. After some changes are made to the geometry, the feature redraws itself and the changes are lost. Usually the problem occurs more ...
2
votes
1answer
304 views

ESRI Javascript APT FeatureSet input to custom Geoproecessing tool

I have an ESRI Javascript application that uses a geoprocessing service that uses a cutsom GP tool. Since I have a set of values to be passed to the GP service I am planning to pass in it as a record ...
5
votes
2answers
1k views

How to find the nearest land mark from a given longitude and latitude?

I have a table called osm_places with place_name geometry, place_type and many other info related to the city. My database system is PostGIS. My requirement is: Given a latitude and longitude ...
2
votes
1answer
378 views

Ordering Layers Dynamically

I'm adding layers to a GeoExt map panel map dynamically in response to a user's selection. I have a corresponding FeatureStore definition from which I create the layers. When a new layer is added, I'd ...
0
votes
1answer
148 views

How can I overwrite the url of OpenLayers.Protocol.HTTP?

How can I overwrite the url of OpenLayers.Protocol.HTTP? I tried searchformPanel.protocol.url and it works (checked with console.log), but at the end the original url is sent (in the code ...
5
votes
1answer
226 views

How to draw graphics in a child window?

I am adding some graphics to the map in a parent window, and I would like to show the same graphics in a child window. I am using the ArcGIS Javascript API (version 3.1). I have written code as below: ...
3
votes
1answer
3k views

CloudMade Routing with Leaflet: route is not displayed

I am trying to consume the CloudMade routing API using Leaflet. So far, I have managed to pass points and receive a response, and parse that response into an array of points. The array of points is ...
1
vote
2answers
813 views

OpenLayers.Class with OpenLayers.Control.GetFeature

I'm wondering if someone could point me in the right direction to force the BBOX of OpenLayers.Control.GetFeature to be always in long/lat coordinates. I'm trying to get this with OpenLayers.Class, so ...
4
votes
3answers
2k views

How to access an wms layer that requires authorization via OpenLayers?

Is there a way to send username and password parameter to a wms layer that needs authorization? If not, I guess it's perhaps a non-spatial thing to solve so that you before the javascript sends a ...
4
votes
1answer
1k views

Drawing Ellipse with OpenLayers

I am trying to draw ellipse on the client side using openlayers with some mathematical functions from drawing ellipse with svg. I have achieved drawing it but not rotation what I have written for ...
0
votes
1answer
789 views

how to find vertices for a geometry in OpenLayers

I am having a LineString, where I need to find the vertices logically and save those vertices. Can anyone help me out. Or else how below can help me. OpenLayers.Geometry.LineString = ...
4
votes
2answers
4k views

d3.geo.path() to draw a path from GIS coordinates

Trying to take GIS data of the zip codes of the Bronx and turn it into a map using d3.js. But I am having trouble rendering. Could you show me proper use of d3.geo.path() ? [ [ -73.84463693999993, ...
2
votes
1answer
221 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
521 views

Center a selected point on map. Openlayers + Geoext1 + ExtJs3.4

I've got an ExtJs combobox next to the map with several points of the map that are provided from a Postgis database through Php/XmlHttprequest. At the same time I've got a map with all points ...
5
votes
2answers
3k views

Turn Popups On/Off in ArcGIS Online Webmap via Javascript API Web Application

I am writing my first ArcGIS Javascript API web map application and consuming a web map authored in ArcGIS Online. The ArcGIS Online web map apparently does most of the work for me in terms of ...
3
votes
1answer
944 views

How to avoid corrupt geometries when translating between TopoJSON and GeoJSON?

I'm trying to display some geojson vector features on a leaflet map. The size of my GeoJSON is too big (25.4mb of data, 8.47mb gzipped), so I'm trying to use a TopoJSON format to reduce the size ...
1
vote
0answers
233 views

How to set up the layer order with Google Maps API?

I'm developing a web mapping site (using google maps api 3.0 and javascript) that combines wms layers and ground overlays (uploaded rasters) that are displayed on top of google maps. The software is ...
2
votes
1answer
1k views

Updating filter values and update map

I'm developing an ExtJS3.4-GeoExt1-OpenLayers2.12 GIS application. For basic functionality I need to filter layers to get specific data from a Geoserver WFS layer. Filter is done through the ...
0
votes
1answer
456 views

How to read/write a/from a file in javascript with prototype.js/jQuery.twFile support OR anyotherway

I want to write my data into a file from OpenLayers, I have gone through Prototype.js and jQuery.twFile.js or anyother way to write into a file.
1
vote
1answer
973 views

How to use filter in GeoExt.FeatureStore?

I have a FeatureStore: var protocol=new OpenLayers.Protocol.HTTP({ url: ...
0
votes
1answer
1k views

Plot points using ArcGIS javascript api from co-ordinates

I would like to map co-ordinates that I got from the exif in photo's using my own command line tool that I made. As opposed to uploading your private photo's for everyone to see on flickr. How to I ...
2
votes
2answers
2k views

Javascript library for converting MGRS to Lat/Lng

Is there a JS library that converts MGRS to LL? I have found one that converts Lat/Lng to MGRS, but nothing that converts MGRS to Lat/Lng. Someone asked this question in the past, but the answer was ...
0
votes
1answer
726 views

How to reproject layers (using GeoServer and OpenLayers) in order to overlay on the google maps [duplicate]

Possible Duplicate: Openlayers and Geoserver: OSM/Google Maps and WMS Overlay I am writing a code using OpenLayers. In this code, I want to display different layers in different zoom ...
6
votes
1answer
2k views

Does Leaflet has option for scale dependent layers?

Is it possible to show layers with Leaflet depending on scaling? For example not show counties until zoom level reaches 10. Thanks.
2
votes
1answer
1k views

Google Map API Drag event..?

The below code is working perfectly on click event to retrieve Lat/Long and Current Zoom level. How do I get the same when I hover mouse/drag on map Window (not on submit button)? <!DOCTYPE ...
1
vote
1answer
149 views

How to replace protocol in geoext.form.formpanel‏‏

I've been scratching my head over this and I'm wondering if this is possible. I want to replace the protocol of the GeoExt.form.FormPanel in the following way: to render the formpanel, I defined a ...
1
vote
1answer
2k views

Initializing Google Maps Streetview object looking at the position

I have a streetview included in my web site using google API to load it. var theloc = new google.maps.LatLng(lat, lon); var panoramaOptions = { addressControl: false, position: theloc, pov: { ...
1
vote
2answers
665 views

How to use Leaflet marker clustering with image map only?

I have image map of one state, where I would like to put about 100 markers. Is it possible to use only one image map instead of CloudMade tiles Leaflet usually uses? So, I need only that image to be ...
2
votes
1answer
498 views

Special background layer not coloring in Kartograph map

I'm testing out Kartograph according to the documentation and a linked gist. Both my US and non-US layers color correctly, but I can not get the special "sea" layer to fill. I found an example here ...
3
votes
2answers
278 views

“Hello World” introduction for ubuntuGIS?

Is the GIS equivalent of "Hello world!" = "You are here?" I installed ubuntuGIS recently, but I'm a little overwhelmed navigating the network of many packages to begin accomplishing simple things. ...
3
votes
1answer
1k views

How to add SLD to a wms layer dynamically from javascript

How to add SLD style which is written in String format and stored in a 'var' variable of javascript and asign it to a WMS layer while creating it.
3
votes
1answer
201 views

How to set up a maximal zoom for polygons in Leaflet?

How to set up a maximal zoom for some layer, for example state polygons? I need that my US polygons which represent states have maxZoom 6, and when zoomed higher than 6, that US counties show up ...
2
votes
0answers
1k views

Problem with multipolygon in Leaflet

I'm using Leaflet L.Polygon, but for some reason there's only blank site. Here's my code: var map = L.map('map').setView([37.8, -96], 4); var cloudmade = ...
1
vote
1answer
233 views

How to add more events like Control.Click and Handler.Point for a single variable in OpenLayers

I have two points which are marked dynamically on the map and when I mark the start point it is returning lon,lat, but I want to assign this coordinates to the variable that marked/handled the start ...
3
votes
0answers
98 views

How to PGRoute from OpenLayers via PostGIS/PostgreSQL [duplicate]

I need to route a shortest distance for a map which I have loaded from a PostgreSQL by means of JSON file. I can project the map in my browser and I can identify the linestrings. For a particular ...
3
votes
2answers
295 views

how to search for a Point of MultiLineString geometry in a json file using OpenLayers

I have a json file with large geometries(MultiLineString), here I got a Point among the json layer(baseLayer). I would like to search for a Point's LineString in the layer, from which MultiLineString ...
2
votes
1answer
91 views

Change text color of PopupMobile

I am facing the problem that with some mobile Browsers like DolphinHD and Android Browser that the browser makes the text color white, and the background is also white. So i want to change the ...
1
vote
2answers
62 views

accesing openlayers.map in index.html

I am developing an app using OpenTripPlanner. It creates an OpenLayer map in map.js. I want to access this map in index.html so I can set it's center. Kindly help me out.
9
votes
3answers
2k views

Chart inside pop up window in Javascript

How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was ...