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)

0
votes
0answers
25 views

Openlayers complex markers

I have an example that displays an image as well as a string for each marker. My designers want the string to be displayed on top of the image and I don't know how long the string can be. Also I need ...
0
votes
0answers
32 views

imposm2 to imposm3

I am using imposm2 to import osm data to postgresql database but recently moved to imposm3 which is still in development phase I want to know is there an easy way to convert imposm2 mapping file ...
0
votes
0answers
94 views

OpenLayers 3 and Interactions - Select and Draw

I'm trying to make small app with OpenLayers3. I want to use two interactions - select and draw. Unfortunately when selet adding it's style to draw and remove other (selected earlier) features from ...
1
vote
0answers
74 views

Create a Leaflet custom checkbox control

I want to create a custom checkbox control which will simply set a flag in jquery/javascript: if checked the flag = 'clustered' or if unchecked flag = 'unclustered'. So far I have a control on the ...
1
vote
0answers
27 views

How to pre-populate JavaScript forms in ArcGIS Web Application?

I have an ArcGIS web application and would like to pre-populate order numbers. Say if order 1 has been entered for a point on a map, when the next point is added, order 2 would populate ...
1
vote
1answer
177 views

How can I extract variable information from an OpenLayers 3 object?

I have tried to make a simple map with OL 3's Geolocation module. I succeeded with a resource wasting method. There must be a simpler way to extract variable information from an OpenLayers 3 object. ...
0
votes
0answers
27 views

Unable to identify the colours on leaflet

var non_tfl_lines_JubileetoIlford = L.geoJson(non_tfl_lines_JubileetoIlford, { pointToLayer: function(feature, latlng) { switch (feature.geometry.type) { case 'LineString': return new ...
0
votes
0answers
81 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
1answer
140 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 ...
3
votes
2answers
80 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
2answers
60 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 ...
4
votes
2answers
66 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
1answer
68 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
1answer
89 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 ...
4
votes
1answer
234 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
1answer
143 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
83 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 ...
1
vote
1answer
77 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
2answers
46 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 ...
2
votes
1answer
72 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 ...
2
votes
1answer
98 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
78 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 ...
1
vote
1answer
54 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 ...
2
votes
1answer
158 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 ...
2
votes
1answer
212 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 ...
2
votes
1answer
79 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
0answers
34 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 ...
1
vote
2answers
333 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
0answers
61 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 ...
1
vote
1answer
52 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
51 views

OpenLayers supported image formats

I need to display ImageLayer in OpenLayers. Which image formats are supported in OpenLayers?
2
votes
1answer
28 views

How to detect other objects are on which side of an object based on lat long

I am working on a system that detects the lat/long of vehicles. I want to track other vehicle's position: left, top-left, right, top-right, bottom-right, bottom-left etc based on lat/long. I have ...
2
votes
1answer
48 views

OpenLayers - cannot set layer opacity

I have the following problem: by default, you can simply change the opacity of layer by writing for example: layer.setOpacity(0.3); But when I add it to my map SelectFeature controls, my layer is ...
1
vote
0answers
30 views

Leaflet: Is there a way to use click event just like mouseout?

I made a map with leaflet by following the official Leaflet tutorial on interactive choropleth maps. I would like to make the map compatible with smartphones, so I added a click event, which acts ...
2
votes
0answers
55 views

OpenLayers: Switch layer off when switching another layer on

As the title says, I want to turn layers off when turning another layer on. I wrote a function that works. However, I have to click the layer twice in the LayerSwitcher to turn the layer on that I ...
1
vote
0answers
75 views

How to change dialog box with jQuery Mobile on OpenLayers

I have a problem with dialog box made with jQuery Mobile on OpenLayers. I want to make a popup box instead of a dialog box, but when i click the point the info for the point appears at different ...
1
vote
1answer
116 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 ...
1
vote
1answer
98 views

How can I measure area in square kilometres from lat / lon gps coordinates?

I have code from openlayers that I cannot quite handle because I am so new for these kind of codes. My main goal is to measure area from n amount of lat/lon gps coordinates and convert the result into ...
2
votes
1answer
30 views

How to display MousePosition outside map container? [closed]

I am a new to OpenLayers. By Default the MousePosition displays the coordinates within the map. I need to display the coordinates outside the map is a specific place. How do I do this?
1
vote
0answers
92 views

Callback method geocode items nominatim not work

function addr_search() { var inp = document.getElementById("addr"); $.getJSON('http://nominatim.openstreetmap.org/search?format=json&limit=5&q=' + inp.value, function(data) { ...
0
votes
0answers
87 views

javascript/jQuery getJSON very slow with a inner loop

asked here too http://stackoverflow.com/q/25024466/528884 I'm using OpenLayers to render DOM for layerswitcher, with about 1200 divs. The problem can be simplified as follows. This is very fast (3 ...
1
vote
1answer
174 views

Changing list-item css class using ng-class when mousing over Leaflet Map Markers

I've got a doozy of an ng-class problem. So I have an app with a map/markers on the right and a list-item menu on the left with info about the markers (like Yelp or Foursquare). With some of my ...
0
votes
3answers
80 views

How to draw polygons from watershed boundary dataset?

I'm working on a web map using esri arcgis javascript api. I'd like to use the NHD Watershed Boundary Data to draw polygons based on the boundaries of the watersheds. Does anyone have any ideas of how ...
0
votes
0answers
217 views

How to create dynamic legend for multiply layers with leaflet.js?

I want to create multiple choropleth maps which displays different statistical data with leaflet.js. So it would be nice to show different legends for each map. I create such legends for two layers ...
0
votes
1answer
62 views

Date field formatting as number in ESRI popup window

We are using the Park and Recreation Locator from ArcGIS for State Government and trying to put a date field into the popup info window. The field is pulling the correct data, but it's formatting it ...
0
votes
0answers
143 views

How can I get responsive pinch-zoom when using OpenLayers 3 and Google Maps

Following the OpenLayers 3 Google Maps integration example, I'm able to put my own custom tile layer over google maps imagery. However, on mobile devices and tablets, pinching-to-zoom only resizes ...
2
votes
1answer
191 views

Check if line crosses a polygon

What I'm trying to do is with JSTS to check with lineGeom.crosses(polygonGeom) function if a line is crossing completely a polygon. The problem is that both cases from the picture returns true. I ...
0
votes
0answers
64 views

Find a polygon by attribute Google map engine

I created a map via Google map Engine, (not the lite/pro). And then added an uploaded shapefile given to me as a data source. I've successfully published the map and access links are now available, ...
1
vote
1answer
65 views

image rectification with Mercator projection

I have written an image rectification function which allows a user to select 2 points on an image and 2 points on a map. The function will then rectify the image so it is translated, scaled and ...
1
vote
0answers
37 views

Calculate distance in point collection algorithm

I've got collection of points which are sorted by x,y and distance between n and n+1 (array of objects [{x:0,y:0},{x:1,y:1}....] I would like to calculate distance between all points (point 1 distance ...