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
29 views

Adding popup to geojson layer based on feature property?

I'm using leaflet and trying to add a popup to a point on the map that will return a property of the point from the geojson file. Going off this post has been helpful problem adding pop-up to GeoJSON ...
0
votes
0answers
16 views

Run-time substitution on MapServer with Leaflet

I have a MapServer instance and map file displaying data in selected countries using a Leaflet WMS tileLayer. This map file works to display points from a single country (showing the LAYER definition ...
1
vote
2answers
237 views

How to convert Shapefile to TopoJSON with grouping neighbor shapes by some criteria

I have a shapefile with countries, which I convert to GeoJSON using ogr2ogr and then converting that json to another TopoJSON, using topojson command-line tool. Everything works like charm, but now I ...
1
vote
3answers
158 views

Is it possible to create a tooltip with a map service?

I am trying to modify the ESRI Parks Finder application to include a tooltip that shows the name of a park when you mouse hover over the icon. It is a map service. Most of the documentation I have ...
1
vote
0answers
32 views

Which one of these azimuth values is the right one? And why?

First of all, let's make clear that I want the Azimuth on the surface of the Earth, i.e. the angle between two locations, for example New York and Moscow. I am testing some azimuth calculations with ...
1
vote
1answer
169 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
3
votes
1answer
29 views

tabbed popup window for Arcgis Javascript

Anyone know examples of a tabbed popup window for Arcgis for javascript, NOT an infowindow? If you could point me in the the right direction it would help.
1
vote
2answers
18 views

WFS Spatial Operator Query - Crosses AND Within

I'm trying to query my wfs service with a polygon. I want the service to return both features that are inside the polygon and partially inside the polygon. However, when I use the "Within" spatial ...
1
vote
0answers
43 views

Is the Azimuth on the equator equal to the one not on the equator?

I am trying to fully understand the concept of Azimuth and I am encountering some inconsistencies (or maybe it is my error). I show you some examples that do not match, hoping somebody can explain me ...
0
votes
0answers
33 views

How to calculate the Azimuth between two points in PostGIS?

I have a GIS API based on OpenLayers. I have been trying to implement Azimuth calculation in JavaScript and I needed some way to calculate the Azimuth in order to perform tests. I started using ...
1
vote
2answers
606 views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
1
vote
1answer
43 views

QGIS 2.4 plugin PyQT qWebview javascript interface problem

I have a QGIS plugin which contains a qtwebview and Javascript communication between the page and the plugin. It is working perfectly with QGIS 2.2 but not with 2.4 (both QGIS versions share the ...
4
votes
1answer
74 views

*Leaflet* mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
1
vote
2answers
35 views

How to style geojson polygon using L.mapbox.featureLayer()

I have this code: var SupIncend = L.mapbox.featureLayer().addTo(map); var ArbolesAntes = L.mapbox.featureLayer().addTo(map); var ArbolesX = L.mapbox.featureLayer().addTo(map); var ...
1
vote
1answer
163 views

problem with popup conclusion on pressing a marker

I have markers on pressing to which popup has to be brought. how to make it? (coordinates of markers undertake from a DB) var map; var markers; function ejecutar() { init(3); ...
1
vote
1answer
35 views

Converting shapefile to KML using JavaScript or PHP?

My client needs to generate maps from shapefiles. Through my initial search, I came to know that we need to convert shapefiles to .kml then we can generate maps from google maps. So I searched for a ...
1
vote
1answer
492 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 ...
2
votes
3answers
943 views

ESRI proxy page not working properly + CORS + cross domain scripting

I have set up a proxy page. I am using jsp version of proxy page. I have set up a server URL which will point to my Java. When I load the my page which the proxy URL has set in its html it will work ...
3
votes
1answer
1k views

Does Leaflet has option for scale dependent layers?

Is it possible to show layers with Leaflet depending on scaling? For example not show counties until zoom level reaches 10. Thanks.
1
vote
1answer
22 views

How can I add a popup on hover for a graphic using the ArcGIS JavaScript API?

I created this JSFiddle for an example. Currently, a user needs to click on the graphic point to see the attribute. How can I make it so the user only needs to hover over the graphic for the popup to ...
0
votes
2answers
30 views

How to get features from a Service Layer?

I am using a Map Service from http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer/. It offers multiple layers and its a great resource. I'm wondering if its ...
1
vote
1answer
14 views

Dynamically changed url in my Vector layer protocol not taken into account after refresh

I have a map which I try to change dynamically its url when the user clicks a radio button. Here is my code : var refreshLayer = new OpenLayers.Strategy.Refresh({ force: true, active: true }); var ...
0
votes
1answer
92 views

JS/browser API library to show/interact with many markers with the best performance?

What's the best Javascript library that can show about 50000 (and more) clickable markers without resorting to things like clustering markers,etc? The markers are clickable and I want to associate ...
0
votes
1answer
176 views

TitlePane not rendering - working with basemapGallery sample code 2

I'm having the exact same issue as this question: TitlePane not rendering - working with basemapGallery sample code but the solution doesn't work for me. my javascript: ...
2
votes
1answer
29 views

Display a link in a popup with Leaflet

Hey there! Im working with the Leaflet javascript library. There should be an option to click on my map and view a popup. I already have a code for that: var popup = L.popup(); function ...
0
votes
1answer
237 views

How to create styled markers with custom marker tooltip

How to create custom markers and when mouseover on marker i need a tooltip can any one suggest me how to do these type of markers...i need markers like below image Thanks in advance
1
vote
1answer
3k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function ...
0
votes
1answer
770 views

OpenLayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal ...
1
vote
1answer
256 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
4
votes
2answers
2k views

d3.geo.path() to draw a path from GIS coordinates

Trying to take GIS data of the zip codes of the Bronx and turn it into a map using d3.js. But I am having trouble rendering. Could you show me proper use of d3.geo.path() ? [ [ -73.84463693999993, ...
1
vote
0answers
22 views

Time Slider in CartoDB

I once again have a question regarding this map project I'm working on. I'm trying to add a time slider to my CartoDB map, and the slider appears, but instead of displaying the correct dates and the ...
1
vote
1answer
27 views

Determine size of screen/map to limit number of markers displayed

I am writing a JQuery Openlayers javascript web application that connects to a API, which exposes a million geo located points plus metrics and information about the points. One metric is a points ...
2
votes
1answer
56 views

Problem measuring area with gps coordinates

I am trying to measure area from gps coordinates but fail to get the correct result (7200 square meters). I used the formula from this post but I get way too high number as result (should be in square ...
0
votes
1answer
79 views

Infowindow split string by comma

I might have went about this the wrong way, though I thought it may be a good idea to ask before starting over again. I have a picture column in cartodb which has multiple picture ids separated by ...
2
votes
1answer
35 views

Adding multiple WMS layers in OpenLayers

I have an array of layers that I am passing to map.addLayers(). When I pass the array to the function in $(document).ready(function (){}), it doesn't add them to the map (i.e. map.layers does not have ...
1
vote
1answer
22 views

Why doesn't a CartoDB layer (using cartodb.js) on top of Google Map in Firefox on Ubuntu work?

I'm creating a layer using CartoDB.js and putting it on a Google Map base layer. This works on every other browser and platform I have access to (IE, Chrome, Firefox on OS X), but does not work on ...
1
vote
2answers
87 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
2
votes
1answer
159 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
1
vote
1answer
68 views

Changing map projection and adding graphic features in projected coordinate system using ArcGIS API for JavaScript?

I'm having some problems with the ArcGIS API for JavaScript. I have a web service that traces an electric network and sends back JSON with point and polyline (path) geometry. I've created a function ...
3
votes
1answer
89 views

Limits to torque and cartodb

Bit of a theoretical one this, but I was wondering if anyone had tried to use CartoDB and Torque with any big(ish) data. What I am talking about is having the location of 75,000 people at 1 minute ...
2
votes
1answer
502 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 ...
0
votes
0answers
15 views

How to add custom events to OpenLayers-based API?

I am woking on a GIS API built on top of OpenLayers. I have a class called xgis.group, which represent a group of layers. I want to add an event that can be triggered when a group is added. For ...
0
votes
1answer
96 views

Mouse click event used gis application with much data

I will create an application that using my water pipes, electric cables, gas pipes service in a city. All of streets and roads including water pipes. My service is publishing pipes. My service like ...
2
votes
1answer
255 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 ...
1
vote
1answer
642 views

How to create working Hyperlinks in OnDemandGrid Cells

I'm creating a simple ArcGIS application that shows a table of data from a feature layer, one of which is a URL string. I'd like to make that string be a clickable hyperlink. Is this possible and if ...
1
vote
0answers
33 views

Multiple Leaflet maps on website in different divs

I'm pretty new to leaflet.js and I'm trying to figure out how to assign the same map with the same set of options and layers to a different HTML container instead of having to remove and add a new one ...
0
votes
1answer
50 views

Bounding the Google Maps Search area to my Fusion Layer area?

I have a searchable Google Fusion Layer of Glasgow Postcodes that highlights the searched areas on a map. The search works fine if I enter a full postcode (for e.g. G1 1BL) that matches the data in ...
0
votes
1answer
193 views

register to event in openlayers 3

I have a web application in openlayers and I am starting to rewrite it to openlayers 3. In the application i have some features that i need to delete/move/add/edit the features then to save it to the ...
0
votes
0answers
19 views

ogr / osr for node.js / javascript

I use a python module I created that does tests for point in polygon. It uses the python osgei/ogr and osr modules. Specifically, I use the following elements of these modules: ...
0
votes
0answers
33 views

OpenLayers supported image formats

I need to display ImageLayer in OpenLayers. Which image formats are supported in OpenLayers?