JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

learn more… | top users | synonyms

0
votes
0answers
10 views

Callback method geocode items nominatim not work

function addr_search() { var inp = document.getElementById("addr"); $.getJSON('http://nominatim.openstreetmap.org/search?format=json&limit=5&q=' + inp.value, function(data) { ...
-1
votes
0answers
12 views

finding of latitude and longitude of some points of a path in Google map [on hold]

Is there any coding to find the latitude and longitude of some points of a predefined path in Google map?
0
votes
0answers
16 views

javascript/jQuery getJSON very slow with a inner loop

asked here too http://stackoverflow.com/q/25024466/528884 I'm using OpenLayers to render DOM for layerswitcher, with about 1200 divs. The problem can be simplified as follows. This is very fast (3 ...
1
vote
1answer
17 views

Changing list-item css class using ng-class when mousing over Leaflet Map Markers

I've got a doozy of an ng-class problem. So I have an app with a map/markers on the right and a list-item menu on the left with info about the markers (like Yelp or Foursquare). With some of my ...
0
votes
3answers
44 views

How to draw polygons from watershed boundary dataset?

I'm working on a web map using esri arcgis javascript api. I'd like to use the NHD Watershed Boundary Data to draw polygons based on the boundaries of the watersheds. Does anyone have any ideas of how ...
0
votes
0answers
28 views

How to create dynamic legend for multiply layers with leaflet.js?

I want to create multiple choropleth maps which displays different statistical data with leaflet.js. So it would be nice to show different legends for each map. I create such legends for two layers ...
0
votes
1answer
21 views

Date field formatting as number in ESRI popup window

We are using the Park and Recreation Locator from ArcGIS for State Government and trying to put a date field into the popup info window. The field is pulling the correct data, but it's formatting it ...
0
votes
0answers
12 views

How can I get responsive pinch-zoom when using OpenLayers 3 and Google Maps

Following the OpenLayers 3 Google Maps integration example, I'm able to put my own custom tile layer over google maps imagery. However, on mobile devices and tablets, pinching-to-zoom only resizes ...
0
votes
0answers
7 views

Find a polygon by attribute Google map engine

I created a map via Google map Engine, (not the lite/pro). And then added an uploaded shapefile given to me as a data source. I've successfully published the map and access links are now available, ...
1
vote
0answers
30 views

image rectification with Mercator projection

I have written an image rectification function which allows a user to select 2 points on an image and 2 points on a map. The function will then rectify the image so it is translated, scaled and ...
0
votes
0answers
12 views

Placing Pins and following transformation on zoom map d3

So I am using this http:// bl.ocks. org/mbostock/4699541 framework on D3.js and I just figured out how to append circles to the map. However when you click on a state the circle moves out of place ...
1
vote
0answers
29 views

How to go about creating a custom tool/adding special functionality for a web app

In my soon to be developed web app, I will have an image service and also a feature service that is essentially an index to the image service, with all kinds of attributes. I would like for the user ...
0
votes
0answers
17 views

How to use different popup styles in the same leaflet web map for different dynamic map layers

I am very new to javascript, CSS and HTML. I have been playing around with leaflet and have been trying to figure out a way to customize popups for different features in my map. Is there a way to do ...
1
vote
0answers
34 views

How do I use Proj4Leaflet projections correctly?

I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different ...
0
votes
0answers
22 views

Add text to PictureMarkerSymbol in arcgis using javascript

I am new to ArcGis, i need complete code of how to add dynamic text on the marker symbol. I have Location Data in Json format: {locations: [{latitude: 52.1, longitude: 4.1, ...
0
votes
1answer
35 views

How to reduce the opacity of a Google Maps layer in CartoDB.js

I have a CartoDB.js-App where I load my vis using cartodb.createVis (I do not manually define Leaflet layers). How can I reduce the opacity of the Google Maps base layer? I tried the following, as ...
0
votes
0answers
18 views

FindTask doesn't work with rest of JavaScript code

I need to add a FindTask to the following code that returns the attributes of the searched in a data grid and selects the data on the map. By modifying the "show find task results in a datagrid" ...
0
votes
0answers
21 views

JavaScript: FindTask works but no data appears on map

I need to add a FindTask to the following code that returns the attributes of the searched in a data grid and selects the data on the map. By modifying the "show find task results in a datagrid" ...
2
votes
1answer
22 views

Make Leaflet Map Background Transparent

How can i make the background of the leaflet map transparent. I see opacity controls from the layers, but not the map background. Should the be changed just with plain CSS? Thanks
0
votes
1answer
29 views

Draw arc in Geo map WGS84 coordinate system

im trying to draw an arc in OpenLayers, in non Geo map it works well and here is my code: function calculateArcPointsNonGeo(center, radius,startAngle,endAngle,segments) { var pointList = ...
0
votes
0answers
31 views

Showing only some points in Feature Layer on ArcGIS.Com WebMap Javascript API

I am looking at creating a webmap which will allow users to place a point either by clicking on a map or selecting a point from a drop down which will then buffer the point. I've done something ...
0
votes
0answers
45 views

ArcGIS Circle Buffer

I am stuck, trying to draw a simple circle buffer using ArcGIS. Here is how I set up my base map: dojo.require("esri.map"); dojo.require("esri.tasks.servicearea"); dojo.require("dijit.dijit"); ...
0
votes
0answers
25 views

Point Cluster Layer not defined

I am trying to do a point cluster layer based on the JSON objects I obtained from database. Here is my JavaScript to plot a point cluster layer: function addClusters() { $.ajax({ url: ...
2
votes
1answer
53 views

How to apply weight to Google heatmap?

I am trying to plot a Google heatmap based on the JSON objects returned. Here is my JavaScript: function getHeatMap() { heatLayer = new HeatmapLayer({ config: { "useLocalMaximum": true, ...
0
votes
0answers
13 views

How can i find shortest point on edge of a polygon from a point to that polygon (not it's distance ) [duplicate]

Point(x,y) may be inside or outside of the polygon ,shortest distance between polygon ABCDE and point(x,y) is marked as red line ,the intersecting point is Point(m,n) .I need the value of m and n I ...
4
votes
3answers
284 views

How can I find closest point on a polygon from a point

I have a point that may be inside or outside of a polygon, I need to find the nearest point on the polygon boundary from the point. Point(x,y) may be inside or outside of the polygon, shortest ...
0
votes
1answer
77 views

Using Google Map Spatial Reference to plot HeatMap?

Basically I am trying to plot a Google heatmap based on the JSON objects returned. Here is my JavaScript: function getHeatMap() { var gradient = [ 'rgba(185, 185, 203, 0)', ...
1
vote
0answers
45 views

How to simulate events from Openlayers 2?

I am working on a GIS API that uses OpenLayers. I am testing it using QUnit. The problem is I need to simulate clicks and trigger some events to be able to test the whole code. For example, I have a ...
0
votes
0answers
37 views

Radius based search with Leaflet maps

Using leaflet I have created a simple map, played around with markers (adding/removing) and have added some GeoJSON data polygons etc. I now need help with implementing a radius search. For example I ...
0
votes
0answers
25 views

Creating a layer switch Google Maps Api v3

I have generated a basic webpage with Visual Studio 2012 that displays a Google Map. My goal is to add multiple KML layers from my Server onto the Google Map, BUT, i want to be able to have a sort of ...
5
votes
3answers
149 views

Guidance when to style your features in Tilemill vs. Leaflet?

I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine ...
0
votes
0answers
26 views

Dojo Stacked Columns Chart for JavaScript ArcGIS Web Map Pop

Anyone know how to use the the StackedColumns chart in dojo for ArcGIS JavaScript API? I need to add one to my popup window. I can only find the documentation below: ...
0
votes
1answer
33 views

Syntax for using ArcGIS for Server layer with WMS service?

I am having some issues with getting an image/png format from an ArcGIS Server. The console returns: Resource interpreted as Image but transferred with MIME type application/vnd.ogc.se_xml: ...
1
vote
1answer
40 views

ESRI Javascript API QueryTask error handling

I'm struggling to find the proper way to handle errors in a QueryTask. Particularly if the user clicks outside the feature layer. My current QueryTask looks at a field (bare_earth) populated with ...
0
votes
0answers
20 views

OpenLayers vector feature not being highlighted

I'm trying to highlight a clicked area of a layer using a vector: var highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", { displayInLayerSwitcher: false, styleMap: mystyle ...
0
votes
0answers
25 views

OpenLayers 2.13.1, how could I make a click, get coordinates, send it to geoserver function?

I am trying to make this very simple function, at the moment I am quite stuck when I have to place the markers as start/end points. I would like to add a marker as start and another as end and then do ...
0
votes
0answers
15 views

Get Web Map Layer Field Value for If/else Statement

I've been trying to read through the ArcGIS JavaScript API but can't find what I want. I have a web map on my page that is based on my my map stored on ArcGIS online. I want to create an if/else ...
0
votes
1answer
19 views

Kml not overlaying onto Google Map

I created a basic dashboard with MVC 4, visual studio 2012, The dashboard displays a Google map. Here is an image of the dashboard: My intention is to be able to take this Kml file: And ...
0
votes
1answer
34 views

ArcGIS Javascript API Editing - Create Feature from Geometry Object

I'm interested in passing a geometry object with certain attributes to an exposed feature class for committed edits. Essentially, I want to manually create a new feature without the template pane or ...
1
vote
0answers
46 views

Openlayers Map Marker / Popup Behaviour Mobile Devices

Quick overview. i am creating a site with a map using Openlayers and Open Street Maps. User clicks on map and fills out a popup form and submits form. Markers appear at lonlat points where map was ...
0
votes
0answers
8 views

WMC as a permalink

I'm using the permalink control in openlayers but there are limitations in the way it handles map's context. For example if users load an external WMS layer it won't appear in the permalink. WMC has ...
1
vote
1answer
46 views

Openlayer3 basemap appears white block in Chrome

i faced interesting an issue on Chrome. im using google's 4 number base layer (street, hybrit, etc.) When my tiles are loading over baselayer, baseLayer becomes white block. Why? No any issues on ...
1
vote
1answer
28 views

How do I cycle through the available Overlays and Base Layers using OpenLayers

I would like to have my map cycle through the display of loaded overlays and base layers using Javascript or jQuery. I would like to do this with a delay of 5 seconds between cycling. Does anyone ...
0
votes
1answer
47 views

Reproject WKT Polygon with Javascript

I have a polygon in WKT in EPSG:4326: polygonWKT = 'POLYGON((13.215179443359373 52.588032137196755,13.42803955078125 52.592620721000365,13.454132080078125 52.46897854656702,13.347015380859375 ...
0
votes
1answer
42 views

CartoDB or Leaflet.js get coordinates of point clicked?

Using CartoDB or Leaflet.js is it possible to retrieve the coordinates of the point on the map clicked when opening an infowindow?
1
vote
2answers
63 views

Leaflet highlight feature by ID

I have a map application where: I load polygons as GeoJSON objects I draw all polygons in a single layer I highlight a polygon on mouse hover What I need to do is the following: on mouse hover, I ...
1
vote
1answer
45 views

Basemap Widgets

I am looking for a fancy Basemap plugin to use with the ArcGIS Javascript API. Something along the lines of the Basemap Widget (see image below) available in the Flex Viewer would be great. Anyone ...
1
vote
0answers
22 views

How to offset/displace overlapping lines in a web map?

I have a dataset of points representing a To/From status - something like distribution centres and delivery addresses. When the user clicks on a point I'd like to show the relationships between this ...
0
votes
1answer
26 views

Accessing organisational webmap using downloaded Basic Viewer of ArcGIS Online?

I have downloaded the Basic Viewer of ArcGIS Online (AGOL) to my web- and arcgis server within my organisation. Now I want that copied basicviewer to access a webmap on agol that I made accessible to ...
0
votes
2answers
58 views

Simulate a mouse-click inside an ArcGIS Online JavaScript Application

I have a JavasScript application consuming an ArcGIS Online Web Map. I want to open a default popup at a specific coordinate. Is there a way to simulate a mouse-click at that point, or a better ...