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
202 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
96 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
255 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
81 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
60 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 ...
3
votes
1answer
300 views

Javascript and esri.dijit.PopupMobile

I currently have a wonderful mobile version of our site up in which it uses PopupMobile to display the requested info. I also map a button on the map that allows the user to do a random function. ...
0
votes
1answer
182 views

infotemplate getting cutoff on top or bottom of screen

in my app, i display few points across the map. these points have infotemplate with details in them and sometimes are quite large (around 350px height) if they have alot of information associated with ...
6
votes
2answers
439 views

Rendering huge amount of points

Evening Guys, I am new to ArcGIS, and currently developing a small app that uses ArcGIS Javascript API. I have encountered a couple of problems while working on this and would greatly appreciate if ...
1
vote
2answers
1k views

Add layer in Openlayers using layer variable passed to a function with setVisibility

I am trying to add and remove layers by passing the name of the layer variable to two separate functions and I can't seem to find any place that describes what I am trying to do. Here is an abridged ...
0
votes
1answer
280 views

GeoExt2 - Popup Bug?

I'm using GeoExt2 (alpha) + Extjs 4.1 now to implement a map application. The thing is sometimes when I select a feature on the map, two popups are displayed. one at the bottom of the screen which has ...
3
votes
1answer
1k views

Problems with gxp Print plugin via opengeosuite sdk

I am trying to import the print plugin within an application built using the Opengeo Suite sdk and I have run into issues as is described in the following thread ...
5
votes
2answers
503 views

How to display a lot of images with OpenLayers?

I would like to display a lot of images at same time. The images are georeferenced (they have extents), with some labels on top of it which, on click, open popup. I can not say how many exactly ...
1
vote
1answer
549 views

Is it possible to show migration arrows on Leaflet map?

I need to develop Leaflet map which will show the whole world. Also, I need to draw some arrows which will show paths of migrations in the world. The important thing to say that those arrows need to ...
2
votes
1answer
142 views

Openlayers layer hide javascript menu

I have java-script menu that is getting behind openlayers OSM layer (only after it loads). I've tried giving z-index:9999 to the menu div but it didn't work. Any idea ?
2
votes
1answer
91 views

Whats steps can I suggest to achieve the best Geolocation Result

We are using Geolocation (getCurrentPosition()) in a website to determine a users position when using our site from a mobile device. I want to write an article explaining how the user can obtain the ...
1
vote
2answers
5k views

OpenLayers vector layer remove all features

I have a map (using OpenLayers) and a vector layer containing features(points). Sometimes I need to remove all features from the vector layer. When I use vectorLayer.removeAllFeatures() then it ...
2
votes
1answer
99 views

Is there a Deployment build of GeoExt 1.1?

The latest version of GeoExt that is available for download at http://geoext.org/downloads.html (version 1.1) appears to be a development version. They are individual files with whitespace and ...
2
votes
2answers
3k views

How to label GeoJSON polygons?

I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from feature.properties.name This is my code where I ...
-1
votes
2answers
226 views

Go to the URL on click with GeoJSON

I'm using Leaflet API and geojson. I defined a function which zooms to the feature when clicked: function zoomToFeature(e) { map.fitBounds(e.target.getBounds()); } function ...
2
votes
1answer
321 views

How to write addressToLocations onError?

How can I write a code for checking the error condition in Javascript (ArcGIS) for addressToLocations(params, callback?, errback?). if somebody entered an invalid address- how can I call error ...
4
votes
2answers
2k views

Click link inside Leaflet Popup and do javascript

I have a leaflet map up and running. It overlays a series of polygons (via GeoJSON) on the map and attaches popups to each polygon. Each of the popups display information about that polygon. I'd ...
1
vote
0answers
389 views

translating and scaling viewport to fit geojson map in D3js

I am trying to load a map of Rio de Janeiro (Brazil) in GeoJson for with D3js the code and the map is here: https://gist.github.com/4157853 I can open the map normally with Qgis, but with d3js ...
0
votes
1answer
646 views

In leaflet does the addControl automatically handle events via the leaflet API?

I need to add additional overlay layers to be controlled by the controls within the leaflet map boundaries, but the code utilizes a leaflet-custom.js file. I am assuming it handles the event and ...
0
votes
0answers
103 views

How do I determine programmatically what values to add to the proj4js constructor for a CRS or SRS such that I can iteratively render proper overlays

I think this is primarily a GIS based question as far as for example: var crs = L.CRS.proj4js('EPSG:2154', '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 ...
4
votes
1answer
670 views

ArcGIS Javascript API - Return 'normal' map extents when panning around the world

ArcGIS Javascript API maps allow the user to pan around the world, which is a great feature, however I am performing some processes that rely on map extents. I have discovered that despite the ...
2
votes
0answers
300 views

How to use javascript in fusion tables to query

I'm having a quite bit of difficulty creating some functions for my fusion tables. I have two tables here: Points Parcels I'm trying to create a number of functions: 1) I want to be able to select ...
3
votes
1answer
1k views

How do I project my WMS tilelayer in leaflet if I want it to display as an overlay on my basemap if they have different EPSG?

So my basemap is a world Mercator projection and in wfs format and I'm trying to put a WMS overlay in a different projection over it? Leaflet's API didn't give me much info on changing the epsg so is ...
1
vote
1answer
831 views

Show Fields in infowindow from my custom layer

I want to display 2 fields from the POIData layer. What i get now is ${ToegangsNr} ${Baanvak} in text. Does anyone know how to do this in an DynamicMapServiceLayer. Thanks in advance POIData = new ...
2
votes
0answers
448 views

Openlayers text layer is not working

I am trying to load markers from a text file using openlayers text layer, but no marker is shown, text file and icons are in same directory. However I am able to show markers using marker layer. My ...
9
votes
2answers
10k views

Adding/Removing Leaflet GeoJSON layers

I'm trying to show different GeoJSON layers at different zoom layers using the Leaflet API. I can load and display all three layers at once (though I don't actually want them all to show at once). I ...
1
vote
0answers
220 views

Layer set visible

I add this layer like this: var POIData = new esri.layers.ArcGISDynamicMapServiceLayer("https://mysite.com/ArcGIS/rest/services/POI_Data/MapServer"); map.addLayer(POIData); ...
1
vote
0answers
117 views

adding WMS service to application ArcGIS JS api

I've got map in projection: 4326 (WGS-84) when I try to add WMS layers which is in different projection I always get connection timeout Do you know if I could change WMS projection to set it up ...
1
vote
1answer
95 views

Is a new map object required in order to create a wms overlay on top of a current map object with wfs layers using the leaflet api

I am trying to add a wms tile layer overlay over a wfs tile layer which I added to a map object. When I tried to simply add a layer on top of my current setView for my map object it overwrote the ...
1
vote
1answer
760 views

Does leaflet support wms tile layers in applications/openlayers formats?

I am trying to create a tilelayer.wms overlay on top of a wfs base map and I wasn't sure whether leaflet allows the applications/openlayers type of format which I served up from geoserver or only ...
0
votes
1answer
62 views

What kind of different results or what is the difference between two URL based WMS requests [closed]

I am trying to retrieve some WMS layers from geoserver so that I can display them in leaflet and I need to populate a URL field and I noticed that many of the layers that I opened up in openlayers had ...
3
votes
0answers
240 views

How do I format tilelayer.wms url properties such that I add an overlay iteratively to my base map in leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so: url: ...
2
votes
2answers
173 views

Can PHP be used to set the XY, zoom of a Mapbox.js map?

All, Is there a way to set the xy and zoom level of a map using the URL of the site that is calling it? I'm thinking of a site I'm using now, built on php, which has mapbox maps built in javascript ...
0
votes
1answer
223 views

Looking for free sdk/lib/framework for UI for openlayers app

I'm looking for free UI lib/sdk/framework to make openlayers app that I can have the map in one panel , the layer control in other panel and maybe hovering tool bar (instead of putting buttons on the ...
5
votes
1answer
1k views

Is it possible to create filters based on attributes for markers in Leaflet?

I need to create filters based on attributes of markers. I have markers defined this way: var locations = [ ['AB11 5HW','17','A',57.147701,-2.085442 ] , ['AB11 8DG','3','B',57.129372,-2.090916 ] ...
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
428 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
195 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
591 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
648 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
534 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
803 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 ...