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

How to do OpenLayers.Request in OpenLayers3?

I have been searching for solutions to call GeoServer REST api from OpenLayers 3 for a long time. I found that for OpenLayers 2, there is a OpenLayers class OpenLayers.Request for doing this: ...
1
vote
2answers
2k views

How to project pixel coordinates in leaflet?

I am trying to create a map based on an image which is 16384x16384 px, but I would also like to add markers at specific locations using pixel coordinates of this given image. I created a tile layer, ...
0
votes
0answers
42 views

Postgresql , PHP JS and Json and Google Maps

I try to make a dikstra pgrouting query in a php file i retrive the coordinates and pass them in the Javascript code as o JSON object and visual in the map use this Script from google api to draw the ...
2
votes
1answer
37 views

Show an ArcGIS InfoWindow on Map Init

I have created a map with a simple marker at a specified location but I cannot figure out how to have an infowindow attached to the position open automatically on page load. This is my init function: ...
1
vote
1answer
90 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: ...
0
votes
1answer
72 views

Google Maps Api , PHP, Javascript and Postgresq-Postgis

I'm trying to make a web application, where I take the start/end city from a text box, geocode the city, use the coordinates to query my database in PHP, and return the features to be drawn in the ...
1
vote
2answers
731 views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
1
vote
2answers
2k views

How to zoom to specific Openlayers point feature on map?

I'm creating website for divers in my country and beside all standard contents and informations it also offers a map which shows some diving clubs, locations and similair. I also have table with ...
1
vote
1answer
335 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
0
votes
1answer
137 views

JS/browser API library to show/interact with many markers with the best performance?

What's the best Javascript library that can show about 50000 (and more) clickable markers without resorting to things like clustering markers,etc? The markers are clickable and I want to associate ...
1
vote
0answers
61 views

ESRI Javascript - Print Task GP Service - Symbology Issue

I am using the ESRI js API, and using a python GP service to run a print task to PDF with custom layouts. This works great, except when i have any map service enabled in the map. The layer in the ...
1
vote
1answer
37 views

Openlayers 3 draw set name

I have following simple draw interaction: draw = new ol.interaction.Draw({ features: featureOverlay.getFeatures(), type: (type) }); Now I would like to add attributes like a name and id to ...
2
votes
2answers
61 views

ESRI JavaScript API FeatureLayer Click Event

I am using FeatureLayers in the API to load in a layer. I have an info template set for the layer for identifying individual features. I am trying to disconnect the click event from the layer while ...
6
votes
1answer
412 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 ...
1
vote
1answer
597 views

How can i use snapp point in when i use measurecontrol?

I have problem about measurecontrol . I can use measurecontrol and i can show length to use measure control . But my problem is that .i didnt use in snap because measurecontrol is a control not ...
2
votes
2answers
265 views

Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for ...
0
votes
1answer
100 views

get and change style property openlayers

i need to change the property of some style after its created, and i need to change it with knowing only the string of the property name. i am getting string like "fillColor" and value like "blue", ...
1
vote
2answers
271 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 ...
1
vote
2answers
216 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 ...
0
votes
1answer
25 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
0answers
28 views

My map looks wierd and “pixly” in OL3

I'm trying to present a mapserver with OL3, it doesnt work well. The documentation of the mapserver is non-existent and the GetCapabilities to the mapserver responds with a very short (not so good or ...
1
vote
0answers
26 views

Is it possible using JavaScript and cartodb.js to get the layer's total amount of visible data in a certain moment?

I am working with a torque layer and I would like to know for each moment the amount of data points shown in the visualization.
0
votes
1answer
273 views

TitlePane not rendering - working with basemapGallery sample code 2

I'm having the exact same issue as this question: TitlePane not rendering - working with basemapGallery sample code but the solution doesn't work for me. my javascript: ...
0
votes
0answers
12 views

Trying to build website which shows different satellite images? [duplicate]

Basically i want to build website which shows different satellites images of cities and as i hover my mouse the lat/long should change. Sorry for such a basic question, as i am new to javascript, if ...
1
vote
1answer
186 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 ...
1
vote
1answer
89 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
1answer
146 views

OpenLayers 3 - draw multiple lines/paths based on coordinates

I am trying to draw a line(s) based on give coordinates (starting and ending point). Googled , found few examples but non of them seem to work probably because they are for OL2, so this is my last ...
0
votes
1answer
39 views

Color Blend Mode for OpenLayers Vector Feature

Currently I'm developing a WebGIS app using OpenLayers 2.13.1, GeoServer, and PostGIS. The app has buffer analysis feature which is working fine like the picture below. What I'm looking for is: is ...
3
votes
2answers
43 views

Geocode an address and then buffer

I have a script which geocode an address and buffer that address by 1, 5 and 10 mile radius. The problem I am having is that the address on the map shows 4 different points not sure what's causing it. ...
1
vote
1answer
6k 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
21 views

How to hide a layer dynamically from layers groups in Geoserver?

I have created a layer group (using 15 layers) in Geoserver. I can access this layer group through Openlayers & it's working fine. As per the client requirement, I need to develop a layer switcher ...
0
votes
1answer
98 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 ...
1
vote
1answer
193 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); ...
0
votes
0answers
15 views

How to draw internal layouts on Google maps

How to draw internal layouts on Google maps can any on tell me how to do this any idea?
0
votes
0answers
13 views

Include Search option in table of contents

I am building an interactive map using ArcGIS javascript API and I want to provide the function to search by the layers in the table of contents. What's the best way to do this?
1
vote
0answers
19 views

Authenticate to geoserver using openlayers 2

I want load layers from geoserver using openlayers in php page. How I should do it? Maybe can give ane code examples? Layers not public, need authentification.
3
votes
1answer
264 views

how to disable duplicate items in the legend for ArcGIS JavaScript API

I have a problem with duplicate items in the legend panel! Can anyone help me? This is my feature Layer with popup info: // Feature Layer var msFeatureLayer = new ...
0
votes
2answers
1k 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
1answer
23 views

How to join the shape to an external data

I'm developing an application that uses Shapes only to draw the map. I would like to "Inject" the data at the time of viewing, since my data is dynamically changing. Anyone know of any way of doing ...
2
votes
1answer
304 views

How to write addressToLocations onError?

How can I write a code for checking the error condition in Javascript (ArcGIS) for addressToLocations(params, callback?, errback?). if somebody entered an invalid address- how can I call error ...
1
vote
0answers
20 views

Grouping map points into fixed cluster sizes? [duplicate]

"I have a dataset of 655 lat/long pairs which I'd like to split into about 100 groups. A group should have 5-10 pairs which are geographically close to each other. Dense groups should have more ...
3
votes
0answers
62 views

Hexagon binning using Google Maps

I have a bunch of geolocated points that I am looking to cluster on a google map using hexagons. These clusters will be stored in a db for quick retrieval and will be reduced to a single point and ...
0
votes
0answers
21 views

Bug with Editor Widget (disappearing custom fields)

I may have found a bug with the Editor Widget in the JS API v3.11; I've tested this in IE9 and IE11, and it doesn't occur in the latest versions of Firefox and Chrome. The customFields disappear when ...
0
votes
0answers
21 views

Get intersection point of two lines with JSTS

How to calculate the intersection point coordinates of two lines with JSTS when the coordinates are in EPSG:900913 projection.
1
vote
1answer
45 views

Mobile device GPS into a PDF Form

This is an issue I've been trying to solve for a while and am told it's not possible. I have made a PDF form with an input box for coordinates. As the form is for use on mobile devices, I would ...
1
vote
1answer
19 views

ol v.2.13 - Selecting features with draw or zoombox

I'm attempting to add a feature to a legacy mapping project. I need the user to be able to draw a rectangle and have the features/markers inside of it selected and pushed into the selected array. Is ...
-1
votes
1answer
47 views

export from json file the coordinates

Hello i need help i cant export and print the coordinates , the format of json is came from a query in a database the format is ...
5
votes
0answers
62 views

Mousewheel event being locked by map

I've got a tabbed UI on my web page, the last tab is an arcgis javascript map built with their API. The problem I'm having is that just adding the map and all of the esri / dojo libraries to the page ...
2
votes
1answer
507 views

How to drag a feature in Open Layers 3

I'm trying to replicate something that was fairly easy in Open Layers 2 in Open Layers 3, which is: dragging an existing feature to a new location on the map. In Open Layers 2 I just added a ...
1
vote
0answers
41 views

How to add a WFS layer to an OSM base layer from GeoServer

I'm sorry if I'm repeating what has been asked several times! I'm a novice in open layers and java script , please can some one tell me where i am making a mistake , below is the code which i used ...