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

Display Google Maps Polygon Edge Distances in Meters?

How can I achieve this using the Google Maps API? The meters on each side.
1
vote
1answer
55 views

How to update leaflet L.imageOverlay using jquery serialize without page refresh?

I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I ...
2
votes
0answers
24 views

split polyline at specific distance

I am working on a project that uses sql server for geometry datatype and arcgis server and asp.net website and entity framework for data access and arcgis javascript api for map viewer. I want to ...
1
vote
0answers
22 views

Retrieve the attributes from a feature with IdentifyTask/IdentifyRequest (Javascript API)

So I'm building a GIS web application. I am able to get the result from IdentifyTask with the "oncomplete" function, the problem I am running into is how I can get the information back out of the ...
0
votes
0answers
59 views

Layer Definition Query - Subqueries

Background: I want to track the movement of icebergs in ArcGIS. In my FileGeodatabase I have a single Iceberg layer. What I have thought of is to create an ID field for each object; each ArcGIS ...
1
vote
0answers
28 views

Increase maximum zoom level for a WebTiledLayer in ArcGIS

I am using the WebTiledLayer from the Javascript ArcGIS API to render a custom WMTS source. The WMTS I am using has zoom levels going from 18 to 21, however I cannot zoom in further than what appears ...
0
votes
3answers
116 views

Read GeoTIFF file with php or javascript

Sorry, I am newbie with GeoTIFF files. I want to create a project that a person can upload a GeoTIFF file and the web application saves the lat/long of the picture into the database, the server side ...
0
votes
0answers
22 views

Node.js transformation from NAD83 to WGS84

I've used the excellent npm shapefile library to import Canadian electoral districts into MongoDB. Here's a sample file: http://ftp2.cits.rncan.gc.ca/pub/geott/electoral/2011/fed308.2011.zip Is ...
0
votes
0answers
15 views

Openlayers map changelayer event firing twice for params

I have registered changelayer event of my map. var registerEvents = function () { map.events.register("changelayer", null, onMapLayerChanged, true); }; var onMapLayerChanged = ...
0
votes
1answer
32 views

OpenLayers Drag&Drop a pin to select position?

Is there an OpenLayers example that allows the user to set a position with drag&drop. I would like to have a pin and set the position after the user drags & drops the pin to a new position.
0
votes
0answers
18 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
23 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
48 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
33 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
21 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
93 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
41 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
83 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
78 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
32 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
50 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
61 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
73 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
131 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
93 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
52 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
36 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
45 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
54 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 ...
1
vote
0answers
56 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
53 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
40 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
71 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
131 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
65 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
27 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
141 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
55 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
0answers
30 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
40 views

OpenLayers supported image formats

I need to display ImageLayer in OpenLayers. Which image formats are supported in OpenLayers?
2
votes
1answer
25 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
32 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
24 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
33 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
47 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
80 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
57 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
29 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
48 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) { ...