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)

5
votes
2answers
21k views

How do you get the coordinates from a click or drag event in the Google Maps API V3?

I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the marker when it is dragged or clicked. Below is my code: <!DOCTYPE html> <html> <head> ...
0
votes
0answers
21 views

How to Show the Lat/Long of Marker in a Textbox if it has been clicked

function getInfo() { $.getJSON("get_info.php", function (data) { for (var i = 0; i < data.length; i++) { var location = new L.LatLng(data[i].lat, data[i].lng); ...
1
vote
1answer
45 views

ogr / osr for node.js / javascript

I use a python module I created that does tests for point in polygon. It uses the python osgei/ogr and osr modules. Specifically, I use the following elements of these modules: ...
0
votes
1answer
59 views

How to submit data to modify feature using applyEdits of ArcGIS API for JavaScript?

I'm new to ArcGIS API. In a form, how can you submit data to modify a feature using applyEdits? No map is involved with this. I have a form that populates the editable data with javascript. When the ...
0
votes
0answers
15 views

How to add 'title' or tooltip to navigationHistory in openlayers

I want to add tooltip/title to NavigationHistory Control in openlayers. I tried 'title' property but its not working. My code is var pDiv=document.getElementById("maptools"); var ...
2
votes
1answer
87 views

FME Server API - Retrieve Output file as a URL

I have a FME Server web workspace converting a file from SHP to KML, once it runs it outputs a kml file, I need to be able to take this file and drop into my web API google Map. Is there a way to ...
2
votes
0answers
37 views

How to get/pass token with ajax call to secured ArcGIS REST Service

I have a web map application that was written in HTML & JavaScript (using the ArcGIS JavaScript API). It desplays a few services that reside on an ArcGIS Server (10.2). It also has a custom legend ...
1
vote
2answers
234 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
99 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
0answers
120 views

Customizing map.on(“click”) while using default editor widget

My question is whether or not it is possible to use the default editor widget in my case given the needs of my application. My map consists of points displayed from four different FeatureLayers. They ...
1
vote
1answer
191 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
35 views

Transfer Data from Database to Leaflet POP UP

Good Day too all! I just wanna ask a little question. Ahmm how do you show data from database to leaflet pop up? Here is my code in php select command <?php $db = new ...
2
votes
1answer
627 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 ...
3
votes
1answer
275 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 ...
4
votes
2answers
2k views

Compute Angle of line in conventional bearing using ArcGIS API for JavaScript?

I am trying to compute angle between two lines (line segment) using ESRI (ArcGIS, JS) in conventional bearing (Eg: N29'E) I am using Add Toolbar to draw a line segment where point A is a fixed point ...
2
votes
1answer
22 views

OpenLayers Only draw features in a vector layer within view

I am dealing with a kml that I am importing into openlayers as a vector layer. This kml has many features so it dramatically slows down the web app. I would like to make it so only the features within ...
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
20 views

Can't Get my legend on a swipe layer map

I'm having trouble getting a legend on my swipe layer map. I'm new to Javascript and took most of the code from the API reference but can't get the legend to show up for either layers. I'm Hoping ...
127
votes
16answers
46k 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
1answer
200 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
571 views

Export KML from points plotted in javascript Google Maps API?

I want to export a KML file from points plotted in Javascript using the Google Maps API. Is there a way to do this? The user logs in and checks Google Maps, then plot points on the map and finally ...
1
vote
0answers
26 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. ...
0
votes
0answers
45 views

Apply css styles to layers in openlayers3

define layers and styles using openlayers3 API. i need 2 apply css styles for layers.for that code is in below used //applying styles for wms layer var fill = new ol.style.Fill({color: 'rgba(237, ...
1
vote
0answers
7 views

Using statisticdefintion in a querytask

I have a question about using QueryTask to accomplish to jobs: Identify unique value for a county in a graphics layer via mouseover. This unique county value (from a specified field) is used to ...
-2
votes
0answers
27 views
0
votes
1answer
31 views

OpenLayers/jQuery without CDN?

I was wondering what are the necessary files for hosting a webgis server with OpenLayers3 without using a CDN? I am testing on a localhost without internet access. It doesn't work to merely copy ...
0
votes
1answer
967 views

OpenLayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal ...
1
vote
1answer
79 views

How to get list of all markers from selected Polygon using OpenLayer MAP v2

I am able to run following features on OpenLayers Map Version 2.x Put Markers on Map Draw Polygon on Map Select Polygon on Map Now my requirement is when i select any polygon then i would like to ...
2
votes
1answer
281 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 ...
0
votes
0answers
39 views

ESRI Mobile Javascript API Click Events not happening on mobile devices

I have a a map with a couple of feature layers. Using a mobile popup to display attribute data of graphics when you select them. Everything looks great on the desktop. However, when you get to any ...
0
votes
0answers
15 views

cannot figure out choloropleth map with kartograph.js

I am trying to make a very simple choropleth map uisng kartograph. i am able to create simple svg world map but i cannot figure out how to create a choropleth map with kartograph.js. The map falls ...
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
230 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 ...
2
votes
1answer
185 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 ...
1
vote
1answer
162 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
174 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
57 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
27 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
votes
0answers
10 views

I need some help with zoom function please?

I create a webgis but zoomin and zoomout function didn't work, I don't know whats the problem. Here's my code, if you don't mind please help me out. Thanks. Ext.BLANK_IMAGE_URL = ...
1
vote
1answer
36 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
votes
0answers
20 views

How to create a dropdown in mapserver?

I have a webgis but it need dropdown box that will zoom any area that listed in the box, and because I use a map that called by mapfile so how I make a dropdown that will show which area selected. Any ...
1
vote
0answers
47 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
39 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
25 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
51 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
609 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
60 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(), ...