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

Getting Node.appendChild error with leaflet

I am trying to add a popup function to some polygons. I've been consulting a few different tutorials trying to work it out and I'm concerned that I am getting conflicting instructions. The map I have ...
1
vote
0answers
57 views

500 Internal Server Error:System.InvalidOperationException: Missing parameter: settlementlocationcode

Here I'm trying to bind the data from database to table for selected features within the user entered buffer distance. This is working for simple query, but it doesn't work for query using PostGIS ...
0
votes
0answers
43 views

how to stop the marker from dragging?

I'm making a form that reads data from a map and puts it in an input field to be inserted into a database. The latitude and longitude were taken perfectly and inserted as expected but my problem is ...
2
votes
2answers
42 views

Knowing if map has specific custom control in OpenLayers 3?

I created my own custom control for openlayers 3 as follows: window.app = window.app || {}; var app = window.app; /** * Control Creado para moverse por el mapa (quitar controles de dibujar...) */ ...
0
votes
1answer
74 views

Zoom to and Spiderfy MarkerClusterGroup, open popup of target marker

I am trying to zoom to a specific marker and open its popup using an external onclick event. To achieve this I need get the leaflet ID of the target marker, spiderfy the MarkerClusterGroup and call ...
5
votes
1answer
42 views

Attempting to map GeoJson file producing issues

I've been trying to get this to work for some time now. The end goal is to produce a map I can show using d3.js, however d3 is butchering the map and producing an undesirable image. The code is as ...
0
votes
1answer
72 views

How to remove or disable dragbox, dragzoom interactions in OpenLayers 3?

I am using the code to zoom the map by clicking and dragging on the map, but I want to remove this interaction when I press another button. How can I remove this? This is my code: var dragZoom = ...
3
votes
1answer
109 views

Extract geojson 'properties' dynamically with mapbox gl

I have an interactive map based on MapBox WebGL. I have an 'on click' function which is returning all information on data layers at that location (lovely). For each object I am trying to pull out ...
4
votes
1answer
148 views

D3: center a map feature using correct latitude and longitude, without rotation?

The following is a map of Chicago which I've created in D3.js, and the JS code to render it. I had a very hard time centering Chicago within my viewfinder (the white box). After much trial and ...
1
vote
1answer
51 views

Set view does not work after Fitbounds

I have a map and a layergroup. var map = L.map('map').setView([27.6758,85.3313], 12); L.tileLayer('http://{s}.tile.cloudmade.com/8ae544230be74379927e6dee5d416398/997/256/{z}/{x}/{y}.png', ...
3
votes
1answer
148 views

qgis2web problem with lots of data

A few month ago I was able to make a polygon map of population: http://supermap.hostei.com Today I opened the same QGIS project and tried qgis2web again. The plugin interface had responding ...
1
vote
1answer
70 views

Openlayers 3 - click under geolocation layer

I am using geolocation feature of Openlayers 3.13, as in the examples. (http://openlayers.org/en/v3.13.0/examples/geolocation.html) However I also have queryable point layers, and when I track the ...
1
vote
0answers
53 views

Leaflet drag scrolling on mobile

My leaflet map is between a navigation bar and a chart displayed underneath. Unfortunately after recently incorporating leaflet-1.0-beta-2 my responsive layout is not working out on mobile devices ...
1
vote
1answer
172 views

Click event doesn't work with with Google Maps

I'm trying to create a simple click event when I click on a list item on my page, a marker should be created on the google map in that page. But it does not happen. Is there some google maps API ...
0
votes
0answers
20 views

Adding additional markup to leaflet marker_

I'm trying to customize the html output for my leaflet markers. Specifically, I'm trying to assign them additional data attributes to trigger bootstrap modals based on an ID pulled from the database ...
0
votes
0answers
37 views

Creating a buffer radius around a point

I would like to create a buffer radius of 1km around a set of points in my WFS layer (I'm using OpenLayers 2). I've tried creating a style but it only makes the points look bigger. Below is my WFS ...
1
vote
1answer
50 views

Problems with case statements in Leaflet's pointToLayer

I am trying to create a layer that has different types of business (separated by code properties in the geojson file) but when it executes the pointToLayer below I get an Uncaught TypeError: Cannot ...
1
vote
0answers
47 views

turf.intersect of a turf.polygon and a turf.linestring?

With the JavaScript library turf, when I try to use turf.intersect(polygon, linestring)) I get the following error: ReferenceError: 'coords' is undefined at ...
0
votes
1answer
91 views

Leaflet OSM Geocoder not working

Maybe this sounds a silly question but the leaflet OSM Geocoder published here Leaflet Control Geocoder doesn't work for me. I can see the search bar but when I search something, nothing happens. The ...
0
votes
0answers
26 views

How can I strip spaces from a moustache template field in CartoDB infowindow?

I have a custom infoWindow on a cartodb.js map which uses moustache templates to populate the fields in the infoWindow. In it I have a link to tweet a correction to the map which I populate with the ...
2
votes
1answer
52 views

Leaflet Map not Visible

I try to make my first Leaflet webmap (I'm very new to JavaScript so please ignore the dirty & repetitive code). I want layer controls and read the Leaflet layer control example but somehow my map ...
2
votes
1answer
80 views

How to set bounds and make map bounce back if moved away?

I wanna make this map bounces to the center, and make the red line the limit that you can move the map. Don't know why my fitbounds doesn't work. Any help? My code: var mapBounds = ...
1
vote
2answers
71 views

Snap polygon to grid (lat/lon)

I'm trying to code this in Leaflet, but the key is finding the formula to do this. Give a polygon (filled in the image), how can I expand it to fit a grid (lat/lon, outer line in image) ? This is ...
3
votes
1answer
68 views

Coordinates translation issue (from EPSG:23030 to EPSG:4326)

I'm trying to figure out how to make some translations from UTM/ED50 to WGS84. The reason I need to do them is that my data source's coordinates are in EPSG:23030 format, and I need to represent them ...
0
votes
0answers
26 views

Why is BorderContainer and ContentPane methods are not called for map and attributeInspector elements using ArcGIS API for JS?

I'm trying to display the attribute inspector on right-side panel when a feature 'onclick' event is called, but whenever i click on a feature the attribute inspector shows-up on left-side of the ...
1
vote
0answers
19 views

Plotting GPS plot without uploading data

I'm not sure if this is possible or not, but I'm wondering if its possible to plot a GPS dataset without uploading the data first to CartoDB. I've been analysing some data by uploading the postcode ...
1
vote
0answers
17 views

OpenLayers 3 - Source with multiple available projections

Is there anyway to specify a (Tile)WMS source that supports multiple projections? For example, my WMS server supports requests for both EPSG:4326 and EPSG:3395. So if the projection is supported in ...
2
votes
1answer
195 views

OpenLayers 3 create bounding extent which includes two points

I'm working with openlayer3 in my ionic application and am stucked with the problem with creating a bounding extent to get a few points in the viewport. My code looks like this: var destLoc = ...
0
votes
0answers
45 views

Tips on building GeoReferencing web app with MapBox?

So I want to build a web app using MapBox GL JS that allows users to Upload an image (preferably any kind) Position it on to a map The image is then uploaded to MapBox as a GeoTIFF and is added as a ...
2
votes
2answers
343 views

Leaflet TypeError: this._northEast is undefined

I have some codes used Leaflet and I want to refactor them below one is working: jQuery(document).ready(function(){ $.post("StatisticsResultServlet", { ...
3
votes
1answer
70 views

Checking if two WGS84 lines intersect in JavaScript

I am trying to work out given two GeoJSON lines (WGS84), if they intersect (i.e. cross one another). Let me give some pseudocode to illustrate: // Providing Line 1 = lon1, lat1 and Line 2 = lon2, ...
3
votes
1answer
50 views

How to fully Style a marker in leaflet?

Styling a marker is possible with pointToLayer I dont know how to get a marker change style for mouse over and for click etc.... var map = L.map('map', { zoom: 14, ...
0
votes
0answers
26 views

How to show a legend of a invisible layer in ArcGIS javascript?

Using the JavaScript API for ArcGIS, I'd like to show the legend of a DynamicMapServiceLayer that's not visible. Is this possible? The result would be a static legend that's always there, no matter ...
0
votes
0answers
41 views

opnenlayers 2 marker icon showing up at wrong coordinates position

the code is written using openlayers2 with bing. I want to add a marker with a custom icon. The code partially works and the marker icon shows up on the map. My only problem is it shows up in the ...
1
vote
0answers
52 views

How to search vector layer features in Mapbox GL JS

I need to add a search bar that will search vector layer attribute features which are hosted by mapbox. I'm using the Mapbox GL JS API. I know this can be done fairly easily with Mapbox js/Leaflet. ...
3
votes
0answers
37 views

Attachment editor esri duplicate files

I am using arcgis API's attachment editor var attachmentEditor = new AttachmentEditor({}, dom.byId("content")); attachmentEditor.startup(); featureLayer.on("click", function(evt) { ...
0
votes
1answer
64 views

How to show/hide markers that are inside a function using js?

I have a map with a lot of markers that are pulled from this function: function showResourcesByName(name) { for (var i = 0; i < markers.resources.length; i++) { var resName = ...
0
votes
0answers
21 views

Creating Interactive Web Map? [duplicate]

After a bit of help. I am looking at creating an interactive map for a website. There seem to be hundreds of different ways of approaching this. Wondering if anyones got any really good examples of a ...
0
votes
1answer
23 views

Modifying OpenLayers 2 to connect to different WMS using JavaScript?

I have a program that runs in tomcat and uses JavaScript to access a postgreSQL database as well as Google, Yahoo, Geoserver, and Open Street Map map services through OpenLayers 2.12. I would like to ...
0
votes
0answers
48 views

Rotate polygons in JavaScript using openlayers

First, thanks for answer my first question. Today, 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' ...
3
votes
1answer
32 views

How to hyperlink from polygon oncick in Leaflet?

I want to hyperlink from onclick of a polygon to new tab based on 'link' field in polygon json. When user clicks on polygon, a new browser tab is opened pointing to URL value of that polygon. I am ...
2
votes
1answer
455 views

MapBox GL geoJSON markers disappear when custom style loaded

I am using this example to load geojson points to to a mapbox basemap. I view it on a browser locally and it works. When I change the style reference to my custom style, the style will display, ...
2
votes
1answer
76 views

Mutually Exclusive Bootstrap Checkbox Switches as Layer Control

I have this JSFiddle with two checkboxes using Bootstrap Switch that changes the layer visibility in Leaflet. I would like them to be mutually exclusive, i.e neither of them can be on or off at the ...
0
votes
0answers
56 views

AttributeInspector is not showing up on 'click' event using ArcGIS API for JS?

I'm creating a application to select features on event 'click' and then using AttributeInspector to edit the attribute fields. I'm also creating draw tools to select features on event click and ...
0
votes
1answer
77 views

Change Bootstrap Switch Depending on Leaflet Layer Zoom

I have this JSFiddle that as you can see has two tile layers. I have set the minZoom of the 'Example Layer' to 5 so that it only loads once you have zoomed in that far. The issue is, using Bootstrap ...
0
votes
0answers
379 views

Access-Control-Allow-Origin in geoserver and ol2

Good morning, I m trying to get a pop up from my map with the getfeauture code. I tried to followed the following example. When i tried to run the code i get the following error in my console: ...
0
votes
1answer
139 views

GeoJSON properties not displaying in popup-leaflet GeoDjango

I want to show the markers in different colours based on column(rastervalues) values in leaflet. My geojson data is {'geojson': "[{'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'ge ...
2
votes
0answers
41 views

How to display join query results on a sublayer in CartoDB.js application?

I'm working with my first CartoDB.js application. I created a visualization on the app using cartodb.createVis('map', visjson_url, opts); The app has two layers, base map and data layer. the data ...
0
votes
0answers
33 views

Apend child to a layertree with

I'm building an application with GeoExt 2 and I'm trying to create a tree layer with some grouped layers. I saw somewhere that you should set the node type to "gx_layer" to get the desired effect. ...
2
votes
1answer
207 views

Setting multiple WMS layers over basemap of OpenLayers 3?

I'm developing a web-based application. In this project I'm trying to create multiple WMS image layer over the map with legends. As you can see below its showing the WMS layer over its basemap . ...