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)

3
votes
2answers
1k views

How to trigger a hover event for map graphics in ArcGIS Javascript API?

I want to trigger an event when the user hovers over a geometry that they drew. I know how to set up hover events for DOM objects, but not for graphic elements within the map window.
0
votes
2answers
231 views

javascript function to search all OpenLayers vector features covering a pixel

I have an OpenLayers map that draws features in a vector layer. The features are selectable and have a popup on select. Unfortunately in a lot of cases the features overlap so it can be impossible to ...
0
votes
3answers
180 views

Read GeoTIFF file with php or javascript

Sorry, I am newbie with GeoTIFF files. I want to create a project that a person can upload a GeoTIFF file and the web application saves the lat/long of the picture into the database, the server side ...
0
votes
0answers
66 views

What is the best way to escape/encode special characters for a CartoDB insert GET request?

I have a simple web app that uses CartoDB.js. I have a data entry form and use jQuery to pull data from my inputs and textareas. I then form my SQL insert statement and insert it into my CartoDB ...
0
votes
1answer
29 views

How to get spatial reference in ArcGIS Server identify response

I'm using the ArcGIS API for JavaScript to query features in a web map. After sending an identify request to my ArcGIS Server 10.2.2 Map Service (added as ArcGISDynamicMapServiceLayer, the response is ...
1
vote
1answer
39 views

Show Cartodb Maps infowindow on hover programatically

How do i get to show the cartodb infowindow when one hovers over a point? I see that it is possible via the gui but how can one do it via code? what method should i call on the on('featureOver') ...
3
votes
1answer
1k views

Arcgis Javascript latitude and longitude convert to WGS_1984_UTM_Zone_36N

I am using Arcgis Javascript api. I have two points comes from Google maps like this x:-111.67095840000002 y: 32.7558935 I wanna use this points on my Arcgis map. My map spatial reference is using ...
1
vote
0answers
55 views

OpenLayers 3 modify end event

I want to save the geometry data after I modify it, so I need an event that fire after I finish to modify the feature. I use the following from this post: listener modify interaction var ...
0
votes
1answer
43 views

openlayers 3 get feature location

After I am using the drawing interaction or modify interaction I have a listener that returns the feature that modified or added. for example: (draw interaction): draw.on('drawend', function (event) ...
0
votes
1answer
27 views

Adding geometry.type circle

I have to amend the following code so that on the map it's possible to draw a second circle graphic as well as a line, polygon and point. I've tried to add an else if statement much like the polygon ...
2
votes
1answer
60 views

find inner bounds of a polygon in leaflet

How can I find the inner bounds of a polygon in leaflet? I a want to plot points randomly in polygoon but when I say Layer.getBounds() I get the bounds and I can still plot the markers ...
3
votes
1answer
617 views

Cartodb - SQL query of public visualization of a private table

The team at CartoDB have recently(last few days) made some useful updates that now allow public visualisation maps to reference data in private tables. The change has only been made in the last day ...
1
vote
1answer
62 views

Google Streetview API overlays

Does anyone know if I can draw georeferenced polygons in the streetview api. I'm curious to know if anyone has successfully tried this. I see that custom overlays are allowed but I'm not sure if this ...
1
vote
1answer
25 views

Disabling a map in Javascript API

Here is my code for my map: omap = new Map("overviewMap", { extent: initExtent, logo: false, slider: false }); tmoverview = new ArcGISDynamicMapServiceLayer(mylayer, { "opacity": 1.0, "visible": ...
1
vote
0answers
19 views

Overlap feature's style with layer style

I have a Vector layer, where each feature is created using a image with different rotations. var point = this.__getFeaturePoint(); featureStyle = { externalGraphic: this.__getImageURL(), ...
1
vote
1answer
70 views

Cant get infoWindow to show in CartoDB dynamic layer

Heres my very simple code. <title>Leaflet multilayer example | CartoDB.js</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta ...
1
vote
1answer
420 views

Google Maps V3 + multiple Fusion Table layers = inconsistent markers?

One of my colleagues is working on a map for a news story and is having some difficulty getting the markers to consistently show up. Changing the order in which the layers instantiate is causing ...
0
votes
0answers
25 views

How to send parameter to mapfile from javascript with query to show map in browser?

I try to send parameter to mapfile but it's seem it didn't work very well. Can anyone help me find solution please? Here's my mapfile webgis.map MAP NAME "Banda_Aceh" SIZE 2000 900 UNITS dd ...
1
vote
0answers
34 views

Legend not removed when layer changed

I made this webpage with JavaScript and CartoDB. The layer selector works like I expected it to but I noticed that the legend are stacking on top of each other and not being removed when the layer is ...
0
votes
1answer
37 views

Openlayers event cluster feature id does not appear on layer vector feature id list

My application's objective is to click on a cluster and produce a popup with a list of all placemarks clustered there where every entry is a hyperlink that closes current popup and opens a new ...
-1
votes
1answer
33 views

How to create if else statement for two combo boxes?

I have an ArcGIS JS API application where I have an "origin" combo box that must be populated for request type, in the following series of combo boxes I would like for a value to be chosen based on ...
0
votes
0answers
25 views

Adding an extra tooltip for addLine

I'm using the following code to include tooltips for drawing a point. I want to include a tootip for drawing a line - how can this be done? Can I just add an extra line for addLine at the end? ...
0
votes
1answer
66 views

animated marker in openlayers3

i want to add a marker on may map but i have to add pulsate class my marker like google map jsfiddle can anyone help me? this is my code var vectorSource = new ol.source.Vector({ ...
2
votes
1answer
420 views

ArcGIS Web AppBuilder widget config?

I downloaded a webapp builder template (javascript) that I've placed on my own web server and is running fine. However, I am not able to modify the widgets in the config.json file to the settings ...
3
votes
1answer
99 views

OpenLayers Map From QGIS Server

I am creating my first map using OpenLayers and I am having trouble. The map was created with QGIS Desktop 2.6, and I am using Ubuntu 12.04. The WMS service is QGIS Service. This is my first try doing ...
2
votes
1answer
887 views

Trouble with accesing API code: “ReferenceError: esri is not defined”

I am developing a web map application in the ArcGIS API for Javascript. I two have ArcGISDynamicMapServiceLayer layers that I am trying to run a simple query task on. The code I am using works in ...
1
vote
1answer
81 views

Convert Multipolygon Geojson to multiple geojson polygons?

I see a lot of questions going from Polygons to MultiPolygon, but is there some easy way to go the other way around? It would also be useful to preserve the attributes from the MultiPolygon to apply ...
2
votes
1answer
57 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
58 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
55 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
91 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
116 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
3k 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
0answers
91 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
47 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
82 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 ...
0
votes
1answer
26 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
30 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 ...
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
125 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
320 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
47 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
56 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. ...
0
votes
1answer
26 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
0answers
18 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
20 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.
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 ...
1
vote
0answers
23 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 ...