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)

2
votes
0answers
478 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 Creating a Polyline Buffer in OpenLayers, and ...
0
votes
1answer
125 views

How to load tiles from geopackage properly using OpenLayers3 and GeoPackage-JS

I am trying to load tiles from a geopackage (rivers.gpkg sample) using the latest version of OpenLayers3 and the GeoPackage JS library (Project-Link). My current try looks like this: As you can see ...
0
votes
1answer
223 views

Is there any Map event fired when map is loaded completely when we device is oriented from portrait to landscape mode?

We are using ESRI ArcGIS JavaScript API in one of our Mobile web app. When map is loaded first time, Onload event is fired. But when we change orientation from Portrait to Landscape, OnLoad event does ...
1
vote
0answers
31 views

OpenLayers 3 Reload Layer(s)

I am working on a project using OL3 in which I need to be able to manually (by button press) or automatically (time based) reload layers IF they have been updated since the last load using HTTP ...
1
vote
0answers
8 views

GeoRSS in Openlayers 3

I have used GeoRSS files successfully in openlayers v2.x but I am not able to find how to handle these GeoRSS files in Openlayers v3.x. Please help if anybody has successfully tested the usage of ...
0
votes
1answer
15 views

Confirm Connect WMS Feed

We currently use Pitney Bowes Confirm Connect for our highways inspections. We are trying to use our own WMS feed instead of the default Bing Maps to allow us to have access to information such as ...
2
votes
1answer
240 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
-1
votes
1answer
374 views

Parsing XML file with hundred polygons using OpenLayers

I'm using this script but It's not working. <script type="text/javascript"> var raster = new ol.layer.Tile({ source: new ol.source.OSM() }); var xml = new OpenLayers.Format.XML(), wkt = new ...
2
votes
3answers
316 views

Drawing box arround text in OpenLayers 3?

I need text labels with surrounding a box and a specific fill color. Actually I have the following function which only shows the text but I don't know how to draw a box around the text. Text length is ...
0
votes
2answers
23 views

Add logo to a map using Leaflet/Mapbox

I am currently trying to learn how to use Leaflet / Mapbox (and JS, to some extent) by creating custom test maps. My problem is that I want to add a logo on the top of my map, with absolute ...
1
vote
1answer
271 views

A problem with event firing upon mouseout

I'm trying to create a point map that displays information about a point in an info box upon user mouseover and changes the styling of the point. On mouseout, I want the info box and marker styling to ...
0
votes
0answers
15 views

Leaflet - Edit Feature Attributes in popup [on hold]

I'm looking to make attributes shown in my click popup editable. I've been piecing together from Leafletjs and many search sources but have hit a wall. GitHub Index Here is a sample I've found which ...
2
votes
2answers
57 views

Convert/display grayscale image as RGB

i want to display raster images using a color palette in a leaflet map. The images are tiled (gdal2tiles) from a single .tif to multiple .png files with values from 0 to 100. I add the image using ...
3
votes
2answers
508 views

Openlayers map WMS stretched by latitude

I am working on a small javascript application for displaying map with WMS layers from 2 servers. The problem is, that image is stretched by latitude, it is wider, as it should be. This is is how it ...
3
votes
2answers
4k views

Google Maps need to click twice to get marker click event to trigger

I have a google map that I am populating with real estate listings from a database. I have set it up to refresh the listings when the map is panned or zoomed. I am using the dragend & ...
0
votes
0answers
16 views

ArcGIS Online - getting token through JSON

I'm new to using JSON and think I vaguely understand it. This may well be more of a Javascript question than a GIS-related one. Basically, I've got a map on ArcGIS Online and I'm looking at putting ...
0
votes
0answers
71 views

Rotate polygons in JavaScript using openlayers

I want to know some ways for rotating polygons. I already success using spring and server, but what I want to do is rotating polygons using 'only' Javascript and openLayers3, not using server. Here ...
1
vote
2answers
191 views

how can I specify a popup to show only for a specific layer in openLayers 3?

I am using the function to define popup contents in a map, and right now, it createa a popup for every feature I click on the map, no matter what layer it is in. I would like this popup to appear only ...
0
votes
1answer
19 views

Multiple Selection with OL2

I created a map with some marker which can be selected and have them name appears in an external field. But i even if i am able to select multiple marker on the map ( shift command ), only one name ...
1
vote
1answer
18 views

Openlayer3 icon mouse hover animation

I am using openlayer3. And using icon as a marker. So my requirement is that when I hover on marker, it should increase in size to show that it is hovered. Till now I have success to detect the icon ...
1
vote
1answer
22 views

How to perform dynamic filtering of multiple check boxes using cql_filter and openlayers javascript?

I have multiple checkboxes for example hospital checkbox where hospital datasets get displayed when checked, phase 1 check box where phase 1 hospitals get displayed when checked and grade A and B ...
3
votes
1answer
570 views

how to disable duplicate items in the legend for ArcGIS JavaScript API

I have a problem with duplicate items in the legend panel! Can anyone help me? This is my feature Layer with popup info: // Feature Layer var msFeatureLayer = new esri.layers.FeatureLayer(...
0
votes
1answer
19 views

leaflet - change routing vehicle when clicked on button

I want to change the routing vehicle when clicked on a button. The default routing vehicle is "car" ("auto") when clicked a button routing vehicle should change to "foot" ("pedestrian"). I am using ...
1
vote
1answer
796 views

Google Hybrid Map tiles won't load in OpenLayers when centered on certain position

Since the Google Maps API update to V3.2 (17 Feb 2015) our maps have not been loading to their initial state, centered over the Gulf of Mexico. When the center location is: center: new OpenLayers....
0
votes
1answer
16 views

Stop event in OpenLayers3

I used the example of this website : http://openlayers.org/en/v3.8.2/examples/feature-animation.html for make an animation. I don't have problem for stopping the event with the function clearInterval(...
0
votes
1answer
37 views

Mapillary JS: mapillary-js storytelling [RouteComponent] hangs

I'm trying to use Mapillary JS (rif. http://blog.mapillary.com/update/2016/02/10/mapillary-js.html), to build a storytelling following this sample http://bl.ocks.org/knikel/630c2d6fa37a8a0e082a. This ...
0
votes
0answers
14 views

xml parsing from url in javascript (OpenLayers)

I have a question concerning parsing an XML url. I have a geocode function implemented in my javascript: function findAddress(){ var address = document.getElementById('address').value; var ...
0
votes
0answers
15 views

calculate new point given distance, bearing, lat and lon Right lat result but wrong lon

I have been trying to get this program to work right, but somehow, although my formular seems right, my calculation for the longitude is off. I want to make a plugin for qgis with this code, or find ...
0
votes
1answer
20 views

draw polygon is not getting end

I have tried the draw polygon, and followed by example i have done like below code <!DOCTYPE html> <html> <head> <title>Measure </title> <script src="...
0
votes
2answers
22 views

OpenLayers : Draw shape from external geojson file

I am trying to draw a shape (airplane) from external geojson file. Said shape uses data from 2 object structures inside the geojson file. I can load both shapes separately, but I can't append/join ...
0
votes
1answer
22 views

Openlayers3 Add click/hover action on ol.layer.Vector

With drawService function, I add on my map dome circle vectorLayer. How can I set a click (or hover) event on the added vectors for displaying their long lat coordinates? function drawService(...
0
votes
0answers
12 views

How to extend Geocoder (Nominatim) with own/distinct address

I want to extend my Geocoder for my leaflet routing map. I am using leaflet routing machine and nominatim geocoder to implement routing and geocoder. Now my goal is: I want to put an a specific ...
0
votes
1answer
35 views

Can't load geoJSON files in Leaflet layer control

First of all, I have to sorry about my English. May not be perfect. I have a problem with show my geojson files into layer control. I read every topic about that on this side, i have tried on a milion ...
1
vote
1answer
719 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
1answer
291 views

OpenLayers 3 doesn't want to draw programmatically a polygon

I am using OpenLayers 3 and i am trying to draw a polygon using given coordinates , but it doesnt want to draw it . var source = new ol.source.Vector(); var ring = [ [...
1
vote
1answer
25 views

Set background color and opacity for a WKT layer vector in OpenLayers3

I have this function: function drawLayer(wktRegion, name,colour = "transparent"){ var format = new ol.format.WKT(); var feature = format.readFeature(wktRegion); feature.getGeometry()...
2
votes
1answer
23 views

change width of outline for leaflet map depending on zoomlevel

I want to change the outline of a polygon depending on the zoomlevel. I thought it's easy to implement but there must be something wrong. My polygons dissapear when I try it with this code: to get ...
0
votes
1answer
315 views

Convert Leaflet WMS layer to Leaflet GeoJSON layer

Using the Leaflet API I am adding a WMS layer through the L.tilelayer.WMS feature. This feature includes only a certain amount of options such as 'layers','crs','style' etc. Through the Leaflet ...
3
votes
3answers
5k views

Problems with ESRI JavaScript API

I'm having some problems to get started using the ESRI JavaSript API. I have a test map service published on my notebook but I can't get it to display. I don't have problems with esri hosted services, ...
0
votes
1answer
309 views

getting attributes of Openlayer Map by Javascript

I have created an OpenLayers map via the following code: var map = new ol.Map({ target: 'mapdiv', layers: [ new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'sat'}) }), new ol.layer....
3
votes
1answer
82 views

Rotate geojson feature with Leaflet

I have a GeoJson feature that is rendered with leaflet and proj4(ESPG:31467). Now I want to rotate that feature so that it NW corner points to NE, e.g. 90 deg rotation. Is there a way to do this? Or ...
0
votes
0answers
6 views

How to get features on the map at (x, y) position using OpenLayers 3? [duplicate]

I'm trying to get every feature at (x, y) position using this code : map.on('singleclick', function(e){ var features = []; map.forEachFeatureAtPixel(e.pixel, function(feature, layer) { ...
0
votes
1answer
24 views

Area measurement with out geodesic in openlayers3

<!DOCTYPE html> <html> <head> <title>Measure example</title> <!--<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>--> <script src="...
0
votes
1answer
34 views

CartoDB- popup window not working

I am working on a project, and I have not worked with cartodb long, but there is something wrong with this code. It is supposed to display a little pop window showing the school district for that ...
1
vote
1answer
267 views

ArcGIS JavaScript Web Application: Workflow for Tokens?

This may appear to be a duplicate but I can't find any online source which is able to help me. Essentially, I want to protect a web Service from unauthorized access but still need to allow a web ...
1
vote
2answers
20 views

Add Leaflet layer based on variable with the same name?

I have a geojson layer named mapLayers and another geojson layer named lmiCounties, with a dropdown list with an item with the id lmiCounties. I want the second layer added to the first, which has ...
0
votes
2answers
31 views

Leaflet Sidebar - set content depending on clicked GeoJSON feature

My goal is to set the content of the sidebar depending on what GeoJSON feature was clicked on. For example when clicked on polygon A the content of the sidebar is: "This is A" and when clicked on ...
6
votes
2answers
238 views

Access GeoJSON from GitHub in Leaflet

I am new to JSON, GitHub, and Leaflet. But I am trying to create a simple application which will render my points which are in GeoJSON up on GitHub. From everything I have read this should work. ...
5
votes
1answer
467 views

Hexagon binning using Google Maps

I have a bunch of geolocated points that I am looking to cluster on a google map using hexagons. These clusters will be stored in a db for quick retrieval and will be reduced to a single point and ...
3
votes
1answer
26 views

GEOJSON - Transition to cartogram

I have 2 GEOJSON files - 1st contains map of indian states ('India-simple.GEOJSON'), and the second is cartogram based on Gross State Domestic Product of that state ('India-cartogram.GEOJSON'). I ...