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)

0
votes
1answer
2k views

Why won't this mapbox map load into a DIV container?

All, For the life of me I can't figure out why I can't load a map into a CSS template I'm trying to customize. I've placed a fiddle here: http://jsfiddle.net/mapbaker/Du7zq/10/ Basically I'm ...
5
votes
3answers
1k views

Create buffer around point in LeafletJS?

I am using LeafletJS. I want to create buffer around point. after Selecting a point buffer radius will be specifed by user in feet. After searching of awhile I found this link of JSTS. does JSTS ...
2
votes
1answer
624 views

call child div function from parent (not using window.opener)

This is a a Javascript/JQuery question that is directly related to the ArcGIS Javascript API... I have a map div created using a 'data' tag in HTML, which becomes visible on a button click. (I'll ...
1
vote
1answer
2k views

How do I create a basic image layer as a base layer in OpenLayers?

I'm trying to create a map using OpenLayers which uses a png image as a base layer but I'm having a bit of trouble. I'm not too familiar with OpenLayers as I have only come across it today and thought ...
0
votes
1answer
300 views

openlayers how to get feature info on form submit?

I have an OpenLayers pop-up with a form on selectFeature (WFS-T). Can I recover the feature.attributes in the form's onSubmit? e.g: the form in the popup var content = '<form ...
1
vote
1answer
246 views

OpenLayers OSM layer

I need to define an layer in OpenLayers just showing world map. The most simpliest variant is to create OSM layer. When I do like this: var layer = new OpenLayers.Layer.OSM("OSM"); ...
0
votes
1answer
959 views

zoom to extent of several vector layers

I'm trying to zoom to the extent of several vector layers data. I've tried to create a new OpenLayers.Bounds bounds and to add a 'loadend' for each OpenLayers.Layer.Vector to increase bounds, but ...
2
votes
2answers
3k views

Add point to center of polygon graphic in the Esri javascript api

I’m using the ESRI JavaScript API 3.3 to develop an application. I am selecting parcels and adding a graphic for the selected polygon. What I would like to do is add a point marker to the center of ...
3
votes
1answer
3k views

ESRI Javascript API Export to Shapefile and CSV

I am working on a Javascript Web Application using the ESRI Javascript API v3.3. My application allows the user to edit and query data and also provides a table for attributes. I would like the user ...
2
votes
2answers
307 views

How can I convert esriMeters to Lat/Lng?

I am pulling a JSON list of features into a web page. The points come as esriMeters and the rest of my app uses Lat/Lng. How can I do this conversion in the browser (javascript)?
1
vote
1answer
188 views

esri.tasks.PrintTask won't print WMS layers hosted by non-ESRI servers

I'm using the ESRI Javascript API. My esri.Map is successfully displaying WMS layers via esri.layers.WMSLayer. Some of the WMS layers are hosted by an ArcGIS Server and some are hosted by non-ESRI ...
2
votes
2answers
2k views

Spatial query in ArcGIS Javascript Api 3.1

I have scenario in which I have to select features drawing a polygon and and get the attribute values in to a tables or lists.The features on the map consist of polygon, line,point at the same time so ...
0
votes
1answer
1k views

Not showing multiple markers on OpenLayers

I want to show multiple markers on my Google map with OpenLayers. Below is my code : for (var pointcount = 0; pointcount < jsonObj.length; pointcount++) { if (jsonObj[pointcount].Long != null ...
1
vote
1answer
715 views

Arcgis Server - Highlight Identified Features

I am identifying features from an ArcGISDynamicMapServiceLayer All the sublayers can be toggle on/off and when identifying, only the visible layers are queried/returned. Below are the initIdentify ...
1
vote
1answer
2k views

create polylines with different colors in leaflet

I have one function which creates poly line & adds that polyline to map function makeRoute(e) { if(pointsSelection.length > 0) { pointsSelection.push(e.target.getLatLng()); ...
1
vote
0answers
843 views

OpenLayers and GeoJSON - possible to create, modify and delete features?

I wondered if anyone has some OpenLayers GeoJSON code to read, create, modify and delete features (i.e. instead of using WFS-T)? This is how far I've come - I've no problem changing the pop-up to a ...
3
votes
1answer
433 views

ArcGISDynamicMapServiceLayer change layer hierarchy

I am building an application off an existing map server using the javaScript API. The server has about 10 layers that I am loading into my application as a ArcGISDynamicMapServiceLayer. Once I have ...
2
votes
0answers
560 views

Are there any examples of WCS getcoverage requests done using ajax?

I am looking through openlayers to try to figure out a consistent format for generating views of coverages that can satisfy any wcs server, but mainly I'd like to get geoserver coverages. While I've ...
1
vote
2answers
674 views

Can anyone point me to good development environment in linux for client side search with flex or javascript?

I want to create a client in mapfish, and/or opengeo, using open layers, maybe cartaro and would like to play in a development environment using flex or javascript. I need to take my data, make it ...
8
votes
1answer
2k views

Building a custom, dynamic legend using ArcGis-server js and dynamicMapServiceLayer

I have a dynamicMapServiceLayer that I am using to build a map application. There are about 10 layers in the mapservice that I am toggling using the setVisibleLayers action. I would like to build my ...
3
votes
1answer
517 views

Rendering error ArcGIS javascript API IE8

I have an issue when displaying features on a map in ArcGIS Javascript API V. 2.8. I want to know if this behavior is seen before, and what could cause it. In Internet Explorer 8 the map looks like ...
2
votes
1answer
1k views

Trouble with accesing API code: “ReferenceError: esri is not defined”

I am developing a web map application in the ArcGIS API for Javascript. I two have ArcGISDynamicMapServiceLayer layers that I am trying to run a simple query task on. The code I am using works in ...
4
votes
2answers
3k views

Hiding infoWindow of ArcGIS API for JavaScript while using measure tool?

In my Javascript API Web application I'm using the infoWindow to query a parcel layer and display display information in a popup when I click the parcel. I've set this functionality to turn on and off ...
2
votes
1answer
46 views

How to show layer when select another layer?

I have an OpenaLayers/gxp application. I have base and overlay layers groups. I want to show some overlay layers when select base layer. For example when i choose BaseLayer1 i want to show ...
-1
votes
1answer
272 views

How to properly use PostGIS with Maps

First time using PostGIS in an app. Target: - Get Heat Map of customers from address table using leaflet.js and heatmap.js Have DB called store_dev. Installed OSM Bright from Mapbox in it. Have a ...
3
votes
1answer
423 views

Convert ArcMap label expressions from VBScript to Javascript or Python

I have a large number of layers (hundreds) with label expressions written in VBScript. I am using ArcMap 9.3.1, and I'm now starting to export the layers as MPKs for use in our ArcGIS Runtime (WPF) ...
5
votes
2answers
1k views

Moveable ArcGIS Identify Popup Window (Dojo)

I'm trying to get a popup window that identifies a location to be moveable. My code is similar to the API example: var popupOptions = { fillSymbol: new ...
0
votes
0answers
268 views

Display a single country with OpenLayers

Can I display a single country using Openlayers? I'm not trying to restrict zoom levels or . I want only one single country to be displayed. The rest of the world cannot be displayed. My reasearch ...
1
vote
1answer
441 views

How do you get the coordinates from a drag event in the Google Maps API V3?

I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the route when it is dragged. I know how to pick up the coordinates giving the start and end points, but, ...
0
votes
1answer
155 views

Populating Dropdown based on Geoserver service

I am new to web programming here. I have a table which has multiple columns including: Restaurant Name,Restaurant Id, Lat, Lon, City, District, Country. My requirement is to build a web client using ...
1
vote
1answer
2k views

sorted ItemFileReadStore list not pushed to dropdown menu // Dojo, ArcGIS

this may be more a Dojo question than ArcGIS, but I am not sure if the Javascript API is related to this issue. I am trying to alphabetically sort a Dojo store and show these items in a dropdown ...
1
vote
0answers
2k views

How to create a Google Maps with draggable routes with fixed markers

I have a webapp where I show a route on a map, I pass two address and show the route on map, so I'd like that this route should be draggable but the points A and B shoud be fixed. How to do this?
2
votes
1answer
7k views

How to geocode addresses from MySQL and add them like markers to the Google map?

I'm using Google Maps API and Google Geocoding for geocoding addresses. I have table named 'users' and column named 'location' in MySQL database. Column 'location' contains addresses. I need to ...
1
vote
1answer
3k 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
922 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
187 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
406 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
796 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
451 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
575 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
175 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
310 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
385 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
228 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: ...