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
2answers
309 views

How to convert Shapefile to TopoJSON with grouping neighbor shapes by some criteria

I have a shapefile with countries, which I convert to GeoJSON using ogr2ogr and then converting that json to another TopoJSON, using topojson command-line tool. Everything works like charm, but now I ...
0
votes
1answer
113 views

Infowindow split string by comma

I might have went about this the wrong way, though I thought it may be a good idea to ask before starting over again. I have a picture column in cartodb which has multiple picture ids separated by ...
2
votes
1answer
178 views

How to disable Google map zooming animation effect?

I am using Openlayers mapping library in my application. I have integrated Google map V3 & added other several WMS overlays, Vector layers etc. Every thing working fine. But I am facing big ...
1
vote
1answer
202 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
0
votes
1answer
39 views

Displaying more than one layer from GeoServer using OpenLayers?

How can I add additional data layers to this code? I tried using "map = new OpenLayers.Map('map', options);" again and set up a tiled layer for buildings exactly as it has been done for roads but not ...
1
vote
1answer
101 views

How do I get ArcGIS tiles to display a single layer when multiple layers are available?

I am using Bing Maps v7 to display layers from an ArcGIS server. The server displays multiple layers as one, but I would like to only display a single layer. Suppose a map service has the layers: ...
1
vote
1answer
32 views

OpenLayers map with Nominatim lookup function not working

I am trying to create a simple map with a search function, my minimal example is here: http://jsfiddle.net/TimLucas/vbaupe30/4/ For some reason the coords transformation after the script has received ...
0
votes
0answers
46 views

Connection to Shapefiles and PostGIS

I have this HTML (see below) code, I want to connect to PostGIS to the Shapefiles I have loaded, but I can't find where and how to accomplish that. I want my map to display this Shapefiles when the ...
0
votes
1answer
33 views

Does an event get fired after a Layer has finished rendering in Openlayers 3?

I am rendering about 27000 Markers in different layers on a mapview. Everything works fine on fast devices. I have a problem on older devices (like the iPad3). When i hide one layer and set another ...
1
vote
1answer
35 views

How to toggle selected features by clicking on them in OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html This is my expected result:http://www.cv.nctu.edu.tw/shapefile-js-openlayers/test.html I want to try ...
2
votes
1answer
78 views

Why my Shapefile is not loaded into OpenLayers?

This is my website for test: http://www.cv.nctu.edu.tw/tonywang/shapefile-js-openlayers/ol_simple.html I want to put my Shapefile in OpenLayers. I found an example at ...
3
votes
1answer
36 views

Define a circle extent using the circle tool - arcgis javascript api

I have the following script for drawing a circle and I want to limit the user to a predefined radius: $('#circle').click(function () { clearPreviousSearch(); ...
0
votes
0answers
108 views

How do I determine programmatically what values to add to the proj4js constructor for a CRS or SRS such that I can iteratively render proper overlays

I think this is primarily a GIS based question as far as for example: var crs = L.CRS.proj4js('EPSG:2154', '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 ...
0
votes
1answer
58 views

Different results of fullscreen mode in OpenLayers 3

anyone here have already met similar problem like me? My original application is not viewing correctly (in all browsers) in fullscreen mode, which is openlayers 3 functionality. The problem is with ...
0
votes
2answers
44 views

Open Layers Label styling (font size)

I have a polygon dataset that I am symbolizing in OpenLayers using a context to determine the correct color, and also a label for each polygon that I want to alter depending on the zoom level. But ...
1
vote
0answers
36 views

Limit Nominatim results tp specific country

I want to limit the search in Nominatim to a specific country and was trying this code: mapPanel = new GeoExt.MapPanel({ border: true, region: "center", map: map, zoom: 7, ...
0
votes
1answer
38 views

How to obtain elevation value from given SRTM data on mouse click in web browser?

I need JavaScript code for obtaining elevation data from SRTM tiff image. I have used Google APIs, but I need for downloaded SRTM tiff image. (SRTM file is being loaded on a base layer, and both ...
0
votes
0answers
93 views

How to add WMS Layer from Mapserver( localhost) on Cesium Globe?

I am trying to add WMS layer from mapserver i.e. from localhost on Cesium Globe with the following HTML code. But I am not able to load or connect Cesium with the Mapserver and nothing is displayed on ...
1
vote
1answer
61 views

Programatically add feature to Feature Layer with ArcGIS JavaScript API

I've so far been able to add a feature layer from an ArcGIS server, and I've also been able to add an editor widget which allows me to draw to feature with the mouse. The added features are being ...
0
votes
0answers
30 views

Prevent rendering of a layer until time definition is applied

I want to add layers to a map, with some criteria. Before the layer is drawn, I want to a set a time definition on the client-side to limit the data being rendered. I've tried setting the time ...
129
votes
16answers
48k views

How do various JavaScript mapping libraries compare?

I am working on a web-based mapping system and I'm trying to figure out the best/most appropriate library to use. There are a few of them about and they each have pros and cons. Even after trying a ...
1
vote
0answers
67 views

Waiting on AJAX result in main JS function

So .... my main init()Javascript function has these 3 lines: sarea = GetArea(Uname,UIDfield,Table, document.getElementById("Source").value); darea = GetArea(Uname,UIDfield,Table, ...
1
vote
2answers
31 views

Including js file in openlayer.js file

I have this code for showing markers on map: function addUserLayerCSV(){ layer1 = new OpenLayers.Layer.Vector("CSV", { projection: epsg6316, strategies: [new ...
0
votes
1answer
100 views

Finding the closest facility in a feature layer from a webmap

I have created a webmap on which a feature layer is displayed and I'm trying to find the closest facility when the user clicks on the map. Based on Find closest facilities in the Javascript API ...
1
vote
1answer
45 views

How to create a infotemplate that displays automatically

I have created a postcode search that that highlights a polygon and zooms in. but I would like it to display a infoTemplate box with having to click in it. I want it to show when the function runs. ...
3
votes
0answers
45 views

simple raster format to use in Web applications?

I'm building a Web application in which users create and edit very coarse raster data. They're assigning values to cells in a georeferenced grid. Right now I'm storing the values in a multidimensional ...
2
votes
1answer
245 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 ...
2
votes
1answer
37 views

Control to select data source on Leaflet map

I am building a map using leaflet. My data source looks something like this: var districts = {"type": "FeatureCollection", "features": [ {"type":"Feature", "geometry": ...
3
votes
2answers
127 views

Setdrawingmode(null) giving Uncaught RangeError: Maximum call stack size exceeded main.js.27

I have my google map codes running for time where I can draw polygon and polyline without issue. Below are my snippet of codes on how I do my drawing. Unfortunately I got this error Uncaught ...
0
votes
1answer
73 views

Adding drop-down menu on leaflet map instead of L.control

I have created a choropleth map including several layers from the same geojson layer which is turkeyData in my case.I actually did it and it works fine. But I like to change the standart leaflet ...
0
votes
1answer
24 views

Automatically select the default feature in TemplatePicker ARCGIS Javascript

I am using this example to implement the editing on my map. Editing Without Widget ARCGIS Javascript The code employs a templatepicker which uses the layers on the map to show the features which can ...
0
votes
1answer
78 views

Configurable map viewer (CMV) - Find the area of drawn polygon

I am trying to get the area of a polygon and divide that by 16.94 ft^2. I have plugged in a Template I found. I am missing something. I am trying to get the template and my original code to talk. ...
1
vote
1answer
43 views

CartoDB SQL and returning values

Right I've got this JS function function AreaCompare(sql, UIDfield, Geogname, Table, sourceName, sourceID, destName, destID){ CompareObj = {}; CompareObj.sName = sourceName; ...
1
vote
1answer
94 views

Using Odyssey.js with Cartodb.js

I'm looking to use Odyssey to create an interactive introduction to various data layers on an interactive web map I've created using CartoDB.js. I'd like to have different data layers turned on / off ...
2
votes
2answers
78 views

Create a layer selector when making a map at runtime for CartoDB

Using the same theory to create a search box at runtime, (such as here), I wrote this code: var l = cdb.vis.Overlay.create('layer_selector', map.viz, {}) l.show(); $('#map').append(l.render().el); ...
0
votes
1answer
90 views

insert update delete wfs layer to gesoerver on openlayers3

i am using geoserver 2.5.2 and openlayers3 i can show geojson wfs data from geoserver with geojson and edit with interactions on map (function () { showData= function () { var format = ...
1
vote
1answer
3k views

Openlayers get coordinates of a circle vector after draw

I have made a openlayers map. I have made two features on the map. Navigate DRAW POLYGON I have made 40 sides to my polygon which turns out to be a circle. After I have drawn my circle I want to ...
0
votes
0answers
26 views

Get latlong at a distance on a path

I have 2 decimal point in lat/lon. I want to divide the line drawn by lat/lon into parts each at a specified distance, lets say 'x' -- all except the last segment will be of length x -- and I need the ...
1
vote
2answers
250 views

Getting value coded of domain from map layer with arcgis javascript api

I'm trying to read domain values on a map, how to achieve this objective in arcgis javascript api? any help?
2
votes
4answers
2k views

Formula to Check Latitude & Longitude is within Area without Google Maps Api

I got this Example Map SampleMap: http://techinfo.co.id/test/map.php I make Boundary Polygon shape , -6.875165174925262, 107.56293296813965 -6.882663904407988, 107.66730308532715 ...
0
votes
1answer
72 views

Problem with Cesiumjs sand castle live editor

I have saved a html file from Cesium SandCastle live editor, but I am not able to run that file on a web browser afterwards, even after loading all the JavaScript files correctly. How to make it run ...
0
votes
2answers
67 views

Javascript + ESRI + Dropdown menu with layers

Dear people of stackoverflow, I have a script that generates a basemap with a layer that I have put on top of it. I am trying to create a dropdown menu in which the user of my HTML5 page can select ...
1
vote
1answer
42 views

The ordering of layers with CartoDB/Leaflet

Just want to get a bit of clarity about this query from before: Layer order in CartoDB I have a map with a Basemap and I want to draw points between features based on layer featureclicks, The good ...
0
votes
1answer
71 views

Setting properties of geoJSON in OpenLayers

I have a map with layers that have similar attributes. I want to add a function that when you select a feature in a layer, it searches for a feature with similar properties in another feature (in this ...
0
votes
1answer
38 views

esri JavaScript Spatial Analysis Services: Select appropriate helper services url from Portal for requested operation

About 6 months ago I built a prototype JavaScript app which uses the spatial analysis service; FindNearest. Find Nearest. I've posted this on GeoNet but haven't had much joy there. The app ran fine ...
1
vote
1answer
44 views

set definition expression based on slider values

Using the Esri JavaScript API I want to control the set.DefinitionExpression values based on a user controlled range slider. The data is loaded from REST as ondemand using: var POP_Total = new ...
0
votes
3answers
210 views

Measure Widget Issue - ArcGIS Javascript API 3.11

I am having an issue with the Measure Widget in my application after updating to 3.11. The widget does not appear after the application loads. I have checked my code and do not see an issue, also ...
1
vote
1answer
57 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 ...
0
votes
1answer
59 views

Configurable Map Viewer (CMV) - average the values of the points

I have been able to select points and find the sum of the points. What I really need is to average the points. Here is my (acquired from someone else) code for finding the sum. define([ ...
0
votes
0answers
20 views

Custom tile area in OpenLayers for every zoom level with a custom tile resolution

For an extend min_x, min_y, max_x, max_y in EPSG:3857 somewhere on the map (eg. france) I have an image cut into n x m tiles and requestable under an URL: http://localhost/map/{x}/{y}.jpeg How do I ...