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
1answer
46 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 ...
0
votes
2answers
2k views

How to create styled markers with custom marker tooltip

How to create custom markers and when mouseover on marker i need a tooltip can any one suggest me how to do these type of markers...i need markers like below image Thanks in advance
1
vote
0answers
11 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 ...
3
votes
1answer
14 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
106 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
44 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
28 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
19 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
16 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
46 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
217 views

problem with popup conclusion on pressing a marker

I have markers on pressing to which popup has to be brought. how to make it? (coordinates of markers undertake from a DB) var map; var markers; function ejecutar() { init(3); ...
1
vote
1answer
33 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 ...
1
vote
2answers
1k views

How to create working Hyperlinks in OnDemandGrid Cells

I'm creating a simple ArcGIS application that shows a table of data from a feature layer, one of which is a URL string. I'd like to make that string be a clickable hyperlink. Is this possible and if ...
0
votes
0answers
20 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 ...
128
votes
16answers
47k 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
36 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
16 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
63 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
41 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 ...
0
votes
1answer
102 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.
2
votes
1answer
231 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
323 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
2
votes
1answer
22 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": ...
0
votes
2answers
27 views

OL3 check if point is inside a polygon

When I am adding a point to my web map I want to give it a latter that represent the area where the point is, so I need to know in what area is the point. In OpenLayers 2 I did it like this: ...
0
votes
1answer
448 views

ArcGIS map service layer not loading properly

I'm at a total loss. My initial problem was an issue with the layer not loading at all when the page was set to the full extent, despite having changed the Min/Max Scale settings generously when ...
3
votes
2answers
103 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
26 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 ...
1
vote
0answers
14 views

Disconnected Satellite map tiles usable with OpenLayers or other javascript api

I'm looking for satellite map, usable with OpenLayer (or with an other js api), with a good scale (at least 100m, MapQuest stops at 1000m) and avaible for a disconnected mode (avaible for download). ...
0
votes
1answer
16 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
42 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
36 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
81 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
70 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); ...
6
votes
1answer
423 views

Why do ArcGIS Desktop 10 HTML popups give JavaScript/HTML Error?

Using ArcMap 10 Desktop HTML Popups. The issue I am having is that the html < select > elements aren't working - you can select it and use the arrow keys to navigate through(up/down) the list but ...
0
votes
1answer
53 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
24 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
185 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?
0
votes
1answer
179 views

OpenLayers 3 zooming to layer when source is ImageWMS

When I create a layer using a vector source I can force the map to zoom to the layer using //stuff including setting up defaultStyle var vectorSource = new ol.source.GeoJSON({ url: geoJsonUrl, ...
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 ...
1
vote
1answer
8k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function ...
0
votes
1answer
42 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 ...
1
vote
2answers
261 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
2
votes
2answers
92 views

Make InfoTemplate moveable but still highlight attributes

I’m using the esri/InfoTemplate in the Javascript API to identify features. However, it gets anchored to the mouse click and cannot be moved around. Based on this answer I used dojo/dnd/Moveable to ...
0
votes
2answers
47 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
38 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
48 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
30 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
21 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 ...