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)

11
votes
2answers
3k views

OpenLayers 2.12 and http basic authentication woes

I am trying to use OpenLayers 2.12 to display WMS layers from a server which has HTTP Basic Authentication enabled. I have tried to handle the authentication by putting the username and password in ...
7
votes
3answers
4k views

Accessing GPS data with JavaScript in real time

Is it possible to access GPS data in real time on a smartphone with JavaScript (without an android or ios application I mean)? Thanks
2
votes
2answers
420 views

Insert Javascript code in Popup.FramedCloud?

I would like to have a live stream from a web camera in a Popup.FramedCloud. All I need to do is to insert this code in the HTML code parameter for popup: <script ...
3
votes
1answer
191 views

is there an API-level error handler in the ArcGIS Server JS API?

I'm seeing an error message in FireBug: Error: Internal kml parser error.http://serverapi.arcgisonline.com/js.../?v=3.2compact Line 34 I'm not worried about fixing this error for the moment - I'd ...
3
votes
1answer
3k views

How can GeoJson polygons be colored programmatically using OpenLayers?

I'm experimenting with dynamically setting the color values of a geojson polygon. In my geojson file, there is an attribute for each polygon called pop_den. I am trying to update the fillcolor of the ...
2
votes
0answers
65 views

Features disapearing

When I add a polygon feature it shows on the map. When I add another one the first one disappears. The code for adding is below: $.postJSON('@Url.Action("GetLayers")', { "planId": planId }, ...
2
votes
1answer
568 views

Displaying ArcGIS Server dates without javascript localized date offset?

Esri recommends that databases are in UTC time. And if I’ve got this right, unless you set a time zone in your layer, you are entering a date in a date field as UTC. Mostly this is fine.You understand ...
3
votes
2answers
624 views

How to speed up the process of vector data visualization for a web application

I have a GIS web application and vector data that is going from the model to the web application. For developing the User Interface I am using JavaScript and OpenLayers. But sometimes the amount of ...
2
votes
2answers
510 views

Insert a loading message into DataGrid

I'd like to show a loading message (Loading...) that shows while the datagrid is being populated. It would show when the search button is clicked and disappear when the grid results have populated. ...
3
votes
0answers
783 views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
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
879 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
275 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
2k 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
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
977 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
490 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
810 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
302 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
199 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
441 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
5k 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
249 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. ...
13
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
349 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
631 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
726 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
733 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 ...
4
votes
2answers
19k 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
439 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
697 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
529 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
7k 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
545 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
286 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
225 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
463 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?