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
1answer
6 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
12 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
20 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 ...
0
votes
1answer
20 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
1answer
22 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 ...
1
vote
1answer
26 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
15 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
9 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
10 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 ...
1
vote
1answer
19 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
17 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 ...
1
vote
2answers
47 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
31 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
36 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
20 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
16 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
22 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. ...
1
vote
0answers
13 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
30 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
14 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
16 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
16 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
23 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
40 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
23 views

Mutually Exclusive Bootstrap Checkbox Switches as Layer Control

I have this JSFiddle with two checkboxes using Bootstrap Switch that change 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
31 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
0answers
5 views

using two jquery lib in same page [migrated]

I'm creating custom page in which menu required other jquery lib and popup required another when i'm putting popup jquery at the end of code only popup function will but it stop my menu animation em ...
0
votes
0answers
24 views

How to show legends of wms image layer in openlayers3

I'm developing web based GIS application, in which I have to display number of WMS image layers over the map. So that when I am calling my first layer or any one of the layer, it should display with ...
0
votes
1answer
29 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
35 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
48 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
26 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
18 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
0answers
91 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 . ...
1
vote
0answers
14 views

Customize QGIS Leaflet webpage [closed]

I created a webpage QGIS map using the Leaflet plugins, how to customize , put mouse over, then features will zoom automatically while you mouse on click on the map features, and also automatically ...
0
votes
0answers
30 views

GeoServer WMS layer does not show with use of OpenLayers

Goodmorning, For a few days i m trying to get a WMS from geoserver to a website using openlayers. But everytime i get pink rectangles. I know that there are a lot of this thread already but i dont ...
1
vote
0answers
40 views

First click layer selector doesn't work in CartoDB?

I'm working on an interactive map using CartoDB built of Leaflet.js. I added a layer selector which works fine after the first click. The first click just doesn't work, if I click the selected layer ...
1
vote
2answers
49 views

Grouping polygons and other geometrical shapes

My situation: I have administrative areas marked with polygons Many areas have many, many, many islands I need main area and all it's islands to change color when any of the islands or main is ...
1
vote
0answers
28 views

Openlayers only keeps the first drawn feature

I would like to save all my drawings on a vector layer stored in a PostgreSQL database and shared by GeoServer for a web mapping application. I wonder why this piece of Openlayer/JS code (as found ...
2
votes
0answers
53 views

Caching Google Map markers/coordinates

I have thousands of markers - I need to cache them and use show-hide tactics to only show like 100 markers at once but I have trouble with caching. Adding all single markers/points to an array and ...
3
votes
2answers
41 views

Vector under OSMbuildings

I would like to display a circle object under the OSMbuildings layer with OSMBuildings . I was trying to change zIndex, bringToBack(), bringToFront() but it doesn't work. I don't use my own GeoJSON ...
1
vote
0answers
31 views

Single button click to bind three javascript functions

I have created cascading dropdownlist for district taluk and villages when i click search button it must zoomed to all the three layers.but i assigned the filter value for village so that it will zoom ...
1
vote
1answer
33 views

OpenLayers 3 Vector layer

Can i add two sources to Vector layer, i want regular feature source, and geojson source? Maybe can I do something like: var layer = new ol.layer.Vector({source: VectorSource, GeoJsonSource}); My ...
2
votes
0answers
41 views

Removing individual markers from map

I have a map with several moving markers on it and have been trying to remove each individual one when their respective animation ends. I am using Leaflet and Leaflet's plugin Leaflet.MovingMarker. I ...
1
vote
0answers
26 views

Plot a bubble chart in d3.js by giving an local geojson file as an input

This is the content in my geojson file { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": { "profit": 326, "npa": 174.000000 } }, { "type": ...
1
vote
1answer
68 views

Mapbox GL JS Geocoder marker

I'm still a js noob. I am currently developing a map using the Mapbox GL JS API with their geocoding plugin, however, I'm am not seeing any examples of adding a marker after the return. I did find ...
0
votes
0answers
12 views

GEOEX2 tree add openlayers

HI I have a question if anyone can help me to add a layer of "new OpenLayers " to the tree ?? my code tree? I know how to use baselayer and overlaylayers but do not know how to add some different ...
1
vote
1answer
50 views

Leaflet marker cluster not working on GeoJSON with MultiPoint geometry

I have a GeoJSON file of fly tipping incidents that I have managed to display on a basic Leaflet map. I am now trying to incorporate the marker cluster plugin, but I am having problems as it does not ...
0
votes
0answers
31 views

Extent goes too far

I have a custom tms tile loaded in a Open Layers 3 map. This tile has a bounding box, effectivly being the 4 corners of that tile. When I set the extent of the TileImage and View, I can only drag each ...
1
vote
0answers
23 views

How to perform Zoom to ImageMapType in Google Maps API?

I am adding ImageMapType on Google Map using Google Maps API. Whenever ImageMapType is added then Map should zoom to that ImageMapType. I have read the ImageMapType reference and found out that any ...