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)

1
vote
1answer
113 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
247 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
990 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
345 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
619 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
708 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
711 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
18k 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
431 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
671 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
510 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
4k 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
537 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
285 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
456 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
62 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
553 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
506 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
511 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
581 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
596 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 ...
1
vote
2answers
3k views

How to get GeoJSON features using OpenLayers?

Can anybody explain how to get geojson features .Can somebody show way to get attributes from geojson text. OpenLayers.ProxyHost = "/gt/proxy.cgi?url="; var lon = 5; var lat = 44; var ...
3
votes
8answers
11k views

How to create an interactive map with jQuery and HTML?

I want to develop a map in JQuery and HTML. It needs to show world country borders. It must be enabled mouse hover effect and also popup (when mouse over) in which I can add my own text. What JS ...
1
vote
2answers
583 views

Handling points in openlayers

I have a several hundred points that I am showing on a map. At the moment, my method of adding the points seems inefficient. I create an array using the following approach: var features = [new ...
0
votes
1answer
253 views

How to add content below the map with Javascript? [closed]

Is it possible to enable some container below the map with JVectorMap? I have some links for all states which needs to appear when user clicks on state. I am new with Javascript so please help me. ...
0
votes
3answers
1k views

OpenLayers: Error message 404 (Not Found)

I've created a map using openlayers contains osm, google layers and some vector features, On loading it shows two errors like: GET http://tile.openstreetmap.org/0/0/1.png 404 (Not Found). How to ...
3
votes
2answers
3k views

Detecting map changes using Openlayers

Is it possible to delete a vector layer when a user pans or zooms a map? I saw in the documentation that there is a function called onMapResize. Can this also be used to detect a pan change? I want ...
2
votes
2answers
875 views

how to buffer inside a polygon in Javascript

I'd like to know if it's possible to buffer a polygon on the INSIDE only using OpenLayers and other Javascript tools (e.g. jsts). Here's what I found about the topic in general: Buffering INSIDE a ...
8
votes
6answers
13k views

OpenLayers - redrawing map after container resize

In my web application, I want to enable users to set the size of the map container. Everything worked fine when the container was expanded slightly (apparently this is because the tiles that were ...
1
vote
1answer
138 views

Using AndNav tiles storage as input for OpenLayers.TMS

Is there a possibility to use map tiles from AndNav (created wit Mobile Atlas Creator) that are in format: Mapnik\12\2241\1369.png.andnav (I know that 12 is the zoom level but don't have idea what is ...
0
votes
2answers
356 views

How to change a marker on click

I've crated a map and tried, but it doesn't change until another event is caught or zooming map or by switching the browser tabs. What is the reason for this. please help me I've fiddle the code here ...
1
vote
1answer
2k views

map extent to show specific country

I use openlayers in my web app.I want to set map extent on specific country to show cities of that country but i don't know which option of map can show specific country in map!. How can i show ...
2
votes
2answers
2k views

How to skip drag event to stop a feature being dragged

I am new to OpenLayers and I'm trying to drag markers and skip some markers from being dragged, I've tried dragFeature.deactivate(); it will deactivate entire features please help me. Please check ...
1
vote
1answer
119 views

Thematic maps on Non Spatial Data in MapGuide

I need to create the thematic map on a polygon layer. But the data is not available in the layer; I am using Postgres database for that. It means I need to create the themes on layer using non spatial ...
1
vote
0answers
22 views

Show vehicle traveled route as animation [duplicate]

Possible Duplicate: Animate feature in openlayers I create map web app with openlayers and yii php framework. I want to show vehicle traveled route as animation like below site in my ...
2
votes
0answers
324 views

Creating a Geodesic Polyline Buffer in OpenLayers

I have a feeling that the answer is going to be 'You can't do that without some very complex coding' but I thought I'd go for it anyway. I recently asked a question on how to create a Polyline Buffer ...