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

Determine why OpenLayers.Bounds containsLonLat() returns false

In this code, I'm loading a bunch of random points that are roughly in the contiguous USA. I've created a OpenLayers.Bounds object roughly corresponding to that extent. When I select a point, I want ...
2
votes
2answers
909 views

Load One Layer from ArcGIS Server MapServer

I am pretty new to ArcGIS Server and am building a map applications using the Javascript API. I can easily load the map layer below by adding it as a ArcGISDynamicMapServiceLayer ...
0
votes
1answer
288 views

Vector data(point) is drawn in wrong place on map (OpenLayers)

I need to show a map (world map, used default OpenLayers WMS) and one point on it (with events like onhover, etc). Here is my code: var options = { ...
1
vote
1answer
3k views

Add label/text to esri.symbol.PictureMarkerSymbol

How can I add label or text on the ESRI's PictureMarkerSymbol (Javascript API)? I could use any other marker as well that support labels. Thanks!!
4
votes
2answers
2k views

Compute Angle of line in conventional bearing using ArcGIS API for JavaScript?

I am trying to compute angle between two lines (line segment) using ESRI (ArcGIS, JS) in conventional bearing (Eg: N29'E) I am using Add Toolbar to draw a line segment where point A is a fixed point ...
4
votes
2answers
1k views

ArcGIS JS API Edit Toolbar permits MOVE but not EDIT_VERTICES or ROTATE - JavaScript error thrown

I'm putting together an ArcGIS (v10.1) JS API (v3.2) application and I've hit a snag in drawing / editing functionality. Users can draw a new geometry or edit an existing one. I'm using the draw and ...
8
votes
3answers
1k views

Map Application Requires Refresh to Initialize

I tried this question over on StackOverflow but didn't get any answers. Hoping you all might be able to help. Creating a web mapping application in Javascript/Dojo: When I load the app in a browser ...
3
votes
1answer
513 views

How to embed ESRI maps on my website

I've got a website where I'd like to insert maps with some placemarks (restaurants, points of interest, ...). I'm tired of Google Maps and like to use ESRI basemaps. Is it possible to do this? I'd ...
6
votes
2answers
2k views

How can several vector layers have different controls, using Openlayers?

Using openlayers I have two vector layers. One layer is called lineLayer consisting of vector lines, and the other is called pointLayer consisting of points. When I hover on the lines I want to be ...
0
votes
1answer
6k views

Google Map - display specific markers popup using a list of markers

I have the following code: <script type="text/javascript"> window.onload = function() { // Creating a new map var map = new google.maps.Map(document.getElementById("map"), { ...
4
votes
1answer
829 views

Using PHP and JavaScript to dynamically create shapefile or KML

While I have used GIS software (ArcGIS and just started playing with QGIS at home), I have never looked into the code or file structure of shapefiles. I am working on a project for my work, a ...
0
votes
1answer
325 views

What would be the URL of a JSON file on the local drive?

When i save json file in web apps then using http://localhost:8080/WGSClient/js/object.json this path file gets open.But when i keep it outside web apps like local folder then using same url format ...
3
votes
1answer
206 views

msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed

I have the following code that generates a map with a couple of layers. var PIDS = ...
2
votes
1answer
2k views

How to use OpenLayers cluster strategies without using a Protocol

Using OpenLayers with Bing maps, I'm trying to load JSON data from a service URL and assign an array of clustering strategies to the resulting layer. There are plenty of examples of using cluster ...
0
votes
1answer
454 views

Openlayers loop through json array and output result with as javascript

Connection.php file which stored database connection code with json: <?php $username = "root"; $password = ""; $database = "roadmap"; $url = "localhost"; $con = mysql_connect($url, $username , ...
1
vote
1answer
116 views

Why does an OpenLayers map.getNumLayers() return 0 even though I've added a layer?

When I try the following code, OpenLayers returns a zero result. What have I done wrong, here? var map; function loadMap () { // Based on example code: view-source: // ...
7
votes
4answers
6k views

How to get JSON from Geoserver using AJAX request

I am building a web mapping application using Leaflet and a sort of customized WFS-T API to place and retrieve features from PostGIS. I have the script for putting features in PostGIS tables down ...
0
votes
1answer
85 views

trying to create array reader for feature fields

I am trying to create a functionality that creates array data for any layer that user selects. Now I am able to get all the data in the feature layer that the user selects but I am having some trouble ...
4
votes
1answer
3k views

Openlayers display a markers popup using a button out of the map

I have the following code which addes 3 markers to the map along with there popup boxes what I want to do is have a list of location at bottom of page and using the id of the marker when click a place ...
0
votes
1answer
253 views

drawing graphic layer on client side with arcgis

hello I'm usign ArcGIS JS api v. 2.8 and.. I've got some problems with drawing graphics point on client side. The problem is, when I draw points by first time by JS api everything is OK. But when ...
0
votes
1answer
2k views

Feature Layer from JSON file

I would like to project my shapefile information on the maps. I converted my shapefile into a JSON file. How can use the Json file to create a featurecollection object in the ARCGIS Javascript API. ...
15
votes
6answers
4k views

Visualizing large datasets with Leaflet

When using Leaflet to visualize a large dataset (GeoJSON with 10,000 point features), not surprisingly the browser crashes or hangs. A sub-sample of 1000 features from the same dataset works ...
2
votes
1answer
2k views

How to change an OpenLayers vector layer from automatic to manual get request?

I have a web server that returns a FeatureCollection in JSON. I was getting this using the code below, which works perfectly: var vectorLayer = new OpenLayers.Layer.Vector('geoJSON', { ...
0
votes
1answer
1k views

Requesting remote data using openlayers for multiple URLS and storing respose value according to URL

I have problem creating feature count window. I have urls stored in as json object. I iterate it with jquery and send request to remote data. The I have featureStore which is initially set to 0. When ...
3
votes
3answers
3k views

local tiles server for offline access

Anyone knows if there is a "lightway" solution to mount a local tile server? Feature I'd to provide is local storage of small sections of maps, not more than small city for example, in order to ...
2
votes
2answers
2k views

Fixing the OpenLayers MBTiles Example

I've been trying to implement the OpenLayers Example for reading MBTiles: http://projects.bryanmcbride.com/ol_mbtiles/ Right off, the link to the necessary mbtiles.php script was broken, but I found ...
1
vote
1answer
356 views

Adding CSV upload browse button to Ext.Action

I am trying to create a CSV File upload on GeoExt Map App. I need to place the upload function within the Ext.Action, so that I can add it to the toolbar of the GeoExt Panel. I am trying to implement ...
4
votes
1answer
654 views

USGS Topographic Map Online API

I am creating a website for a non-profit organization and would like to plot points on a map similar to this: http://www.arcgis.com/home/item.html?id=931d892ac7a843d7ba29d085e0433465 I am currently ...
2
votes
2answers
742 views

Convert dijit.TitlePane to dijit.form.ToggleButton

I have an app that I'm building using the javascript API and have created 3 titlepanes in the header that open up to reveal information (basemap gallery, legend, layers). It functions exactly how I ...
0
votes
2answers
758 views

Toggle Visibility of Features in FeatureLayer

How to toggle the visibility of features in a feature-layer using check-boxes .I have grid containing check-boxes in a columns representing each feature in Feature-layer and so if I check off the ...
5
votes
2answers
21k views

How do you get the coordinates from a click or 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 marker when it is dragged or clicked. Below is my code: <!DOCTYPE html> <html> <head> ...
5
votes
1answer
445 views

Unclear on proxy used for AJAX in Javascript

I do understand how the proxy helps in transferring the XMLHttpRequest between the ArcServer and the Server (IIS/Apache) but where I am confused is that the first time the Html Doc loads, doesn't the ...
0
votes
2answers
718 views

Unable to reflect JSON in grid

I am trying to fetch the data from JSON and display it onto the grid. The store has all the JSON data, but I it is not visible in the Grid. The grid comes out completely blank. This is the ...
2
votes
1answer
544 views

Problems using 2 maps with multiple layers and loadend event

I have 2 or more maps with one ore n layers on each map. Now I want zoom to extent for each map, but the getDataExtent returns only for the last layer in the last map a bounds. Can you help me? Here ...
3
votes
2answers
8k views

How to redraw / refresh map on canvas resize?

I've created a web page that contains a button to set the map full screen and back to its normal form, the problem map doesn't set to full screen until I resize the output window, how to overcome ...
5
votes
1answer
5k views

How to open popup on mouseover in Leaflet? [duplicate]

Possible Duplicate: How to show a popup on mouse-over, not on click? I'm working with Leaflet library. I defined L.layerGroup and add some markers to the group. Can somebody help me with ...
0
votes
1answer
558 views

How to define image map with pins in Javascript?

I have image map in .png format. All I need to do is to add a sidebar where users click on for example "restaurants" and pins with restaurants will show on an image map. When user mouseover a pin, it ...
1
vote
0answers
289 views

What are some really cool web/mobile GIS UI examples? [closed]

I need some ideas on eye candy for our product. We have to display maps with lots of data on accessible through the web. Most sites I have seen have a Google, or OSM map with markers and layers ...
0
votes
1answer
229 views

PopUps for all the Feature layers

I am trying to create GeoExt action button to fetch the feature info from all the layers. I am still getting the info for my point features but I am getting nothing for the usa:states, that appears in ...
2
votes
2answers
2k views

How to read OpenLayers event object features?

This is part of an interface that uses a box to select features on a WMS Layer. This then writes the name of the features to a div as a list. var recycling = new OpenLayers.Layer.WMS( "Recycling ...
0
votes
1answer
480 views

Is it possible to show markers from MySQL database with Javascript?

I'm interested if it's possible to show markers (latit, longit) from MySQL database with Javascript libraries like Leaflet?
2
votes
2answers
64 views

How can I create a new function inside a existent class in OpenLayers?

I want to add some functions inside a existent class in OpenLayers. For example, I want to add function A() and B() and a variable C inside OpenLayers.Layer.Vector. var X = function() { A() = ...
8
votes
2answers
2k views

How to resize a point on zoom out?

I've added a point on map like this but it is static in size. How to resize that point on zooming? Map on zoom out Any guidance and help is appreciated.
3
votes
1answer
576 views

How to hide some parts of an image layer with OpenLayers?

My Problem I'm currently displaying a layer image above a Google Maps base layer. I would like, when the user check/uncheck some checkboxes, that some parts of this image layer disappear, and the ...
3
votes
1answer
526 views

How to show a point on mouse over a hidden polygon?

Any suggestions on how to show a point on mouse over a hidden polygon? A single kml file contains two polygons and two points as in the image, I've hidden these polygon and point by setting stylemap ...
5
votes
1answer
537 views

ArcGIS Online without basemap

I am trying to create a Web App, using the ArcGIS Online feature of downloading the javascript code, with the map id being used for connecting to the ArcGIS Online. I was able to do that successfully ...
2
votes
1answer
605 views

Connect JSON to GeoExt Application

I am returning a JSON to a GeoExt app and this is the code that is collecting the return, var control = new OpenLayers.Control.Click({ trigger: function(evt) { ...
1
vote
2answers
619 views

Problem with panning and zooming in OpenLayers

I'm interested in detecting when a user moves or pans a map so that I can run a new query on a database based on their location. However, the following code causes the panning and zooming controls to ...
2
votes
2answers
2k views

Openlayers: How to highlight a point on mouse over a line

Any suggestions on how to highlight a point on mouse over a line, I've read points from a javascript array, lines are drawn by using them and I want to highlight some points in that array by moving ...
0
votes
2answers
4k views

Differences between ExtJS and Dojo Framework

I have been using OpenLayers and the ESRI's JavaScript API and found that both using different set of JavaScript libraries have some implications on the quality of application that they deliver. Dojo ...