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)

1
vote
1answer
108 views

Adding KML to OpenLayers as a textstring

I am trying to display a kml as a vector Layer. I have it stored as a Perl scalar variable but have also tried setting it as a javascript variable. I've tried to separate bits of code that I got from ...
1
vote
2answers
4k 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 ...
4
votes
1answer
856 views

Implementing non-default keyboard shortcuts in Openlayers

Following on from this thread, I am trying to implement @Aragon's suggestion and add some keyboard shortcuts to OpenLayers via a handleKeyEvent method in OpenLayers.Handler.Keyboard. This ought to be ...
0
votes
1answer
1k 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 ...
4
votes
3answers
648 views

More zoom in base layer in openlayer.

I have some GIS project to do, in this project I need to place something like 20,000 trees on a map. So I did a web app with .net that includes map that based on OpenLayers with bing base map. My ...
-1
votes
1answer
1k views

How do I parse complex json? [closed]

My json response: {"type":"FeatureCollection", ...
1
vote
1answer
468 views

ESRI World Light Gray Base Map JavaScript - Prevent zoom out no more than the full extent

It is my first attempt to use JavaScript and the ESRI products. I am using the World Light Gray Base map for my first web GIS application. I have a question about the map full extent method. I would ...
1
vote
1answer
386 views

WFS request with Openlayers; blank request

I'm having trouble to add a WFS layer over an OSM map. At first I thought that my data had a problem, and I thus decided to adapt one of the example on the Openlayers website. I have no error ...
1
vote
1answer
332 views

Get latest tiles from TileMill's tile server in Leaflet

My leaflet app gets the tiles from TileMill's tile server in the standard way: L.tileLayer('http://<myip>/tile/SteveCountryVic/{z}/{x}/{y}.png', { ... }); These tiles are often old, not ...
2
votes
2answers
1k views

How to determine intersection between geojson feature and given coordinates?

I'm overlaying a leaflet map with features of geojson, fetched with d3 and added as SVG elements to the DOM. My geojson contains too many features to render at once, so my goal is to add to the map ...
2
votes
3answers
919 views

How to visualize Google Fusion Table Map using JavaScript?

The simplest question. When you create a google Fusion Map with geographic data, Google provides you with an iframe link to display the Map on your website. But i need to display that information ...
0
votes
2answers
693 views

openlayers draw feautre(line, polygon) callback

I need to enable feature drawing functionality. Code: var drawingControl = new OpenLayers.Control.DrawFeature(someLayer, OpenLayers.Handler.Path); map.addControl(drawingControl); But I also need ...
3
votes
1answer
1k views

WMS Geoserver layer over OSM

I have a Geoserver with a layer in a EPSG:32632 projection. I want to display this layer over Open Street Map tiles. When I use the following html code: <!DOCTYPE html> <html> ...
0
votes
1answer
208 views

Suite SDK gxp Print plugin

I have problem with gxp print plugin. I create new sdk project suite-sdk create ~/sdk. Next I do everything from Problems with gxp Print plugin via opengeosuite sdk but there is another problem. But I ...
3
votes
0answers
185 views

OpenLayers and external CSS

I am using geoExt and OpenLayers to plot some map. Everything worked well until I had to add some styling. To display it on the webpage, I need to use the CSS of my university and once I do that, I ...
0
votes
1answer
310 views

Mapfile + OpenLayers: accessing the database by column names (hover, onclick functionality) without using MapServer templates?

What I'm trying to accomplish: take the functionality below (see picture) and do the same without using a MapServer template (if this is even possible). I currently have a mapfile, and an openlayers ...
1
vote
2answers
572 views

ESRI JS API - How to get event object from Draw Toolbar onDrawEnd

I am using the Draw Toolbar in the Esri Javascript API v3.4 and connecting to the onDrawEnd event using aspect.after(drawingToolbar, "onDrawEnd", drawEndHandleFunction, true); I am using the Draw ...
0
votes
0answers
70 views

MapServer Templates: Javascript function won't recognize [LONG] or [LAT]

Tested this in js console with a 'normal' variable and working fine: js function in map_header.html var toFixed = function(val, n) { var result = val.toFixed(n); if (result == val) ...
0
votes
1answer
501 views

GeoExt: Turning off layer title in legend

I am using GeoExt for my web mapping project. My web map includes a legend generated by GeoExt. Is it possible to turn off the layer title for a specific layer in legend? I am aware that there is a ...
1
vote
1answer
341 views

How to create a drop-down list of geoprocessing tasks?

I need to construct a drop down menu with each choice enabling a different geoprocessing task to run over my script. <select id="myList" onchange="environment()"> ...
2
votes
2answers
351 views

District border join in Google maps

I am developing a district editor for cities. The idea is that we divide the city into districts. I am using GoogleMaps, but any other js library is acceptible. Problem 1: districts are connected ...
4
votes
1answer
372 views

about token based authentication security

I am reading the authenticated services with token. I understand that a user have to get a token to using arcgis services. Example: https://domain.com/arcgis/rest/services/myMap/MapServer is my ...
3
votes
2answers
630 views

Google Maps Polygon to WKT

I need to convert a Google Maps polygon object (can has multi paths and holes) to wkt string (multipolygon) at client. Then i'll able to save polygon as geography in Sql Server 2012. I tried Wicket ...
0
votes
1answer
4k views

leaflet fitBounds with multiple marker

I have created two checkboxes. If I check one it will zoom to a point with marker. If I uncheck the checkbox the marker removed. Similarly second one is working. But I want to do if the two checkboxes ...
0
votes
1answer
69 views

Reference Error: selectZIP is not defined

In Firebug I keep getting this error when I try to click a button I made. <button type="button" onclick="selectZIP()">Execute</button> I declared a function called selectZIP in a .js ...
4
votes
2answers
2k views

How do I get that polygon from Javascript ArcGIS API?

I would like to have a user draw a Polygon (or Line) onto a web map with the Javascript ArcGIS API drawing tools. For the life of me I can't figure out how to pull that polygon from the client and get ...
0
votes
2answers
118 views

MapServer: Symbol color is set in mapfile. Is there a way to change it using javascript (ie not in mapfile)?

I have a mapfile where the symbol color is set to blue. In my html I have a hover event that brings a popup when the user puts their cursor over the symbol. Working as intended. Now on that same ...
2
votes
1answer
251 views

Add button to map

I know this is a a stupid and direct question. How do I add a button to a normal map? Example: http://developers.arcgis.com/en/javascript/samples/map_simple/ I'm finding a way to make a button ...
0
votes
0answers
1k views

Unable to dynamically locate map boundary coordinates in OSM/Leaflet

I have been trying for the past hour to take the coordinates of the map edge in a OSM/leaflet application I am making. While I can get the coordinates of the center, and I can get the coordinates of ...
1
vote
1answer
655 views

Conversion problems from mappoint to screenpoint using ArcGis Javascript API

I am getting a very strange problem when converting from mappoint to screenpoint. I am using the following code: var sp = esri.geometry.ScreenPoint(512, 151); mp = map.toMap(screenPoint); ...
0
votes
0answers
244 views

MapServer with OpenLayers: Map is Pink, Trouble Displaying Layer Correctly

Having trouble using a mapfile with an html/js file(openlayers) together. Have a working example but can't seem to replicate it. Can also view the gist of the 2 files here The piece of code in ...
2
votes
1answer
2k views

How to find direction points using Google Maps API 3?

I am drawing a route in Google Maps. I have passed the start point, way points and end points. My route is drawing correctly. I am using Google Maps API 3. request = { origin: originAddress, ...
3
votes
2answers
2k views

OpenLayers: Possible to show zoom level?

Been researching this for a while and nothing has come to fruition. Best I could find was: OpenLayers.Control.ZoomStatus = OpenLayers.Class(OpenLayers.Control, { autoActivate: true, element: null ...
1
vote
1answer
254 views

Can I use a Esri geocoding service with my custom basemap?

I am looking at the JavaScript samples in here. I am searching some street by search bar. But not zooming to street, it only viewing city. I have a custom tiled map service layer in my server. Can I ...
1
vote
1answer
388 views

Hiding Rest Service Url in Javascript

While users using my application, they can view resource from browser and see my arcgis rest service URLs. So If I use token based security, security token can view. Can I hide this from users?
1
vote
1answer
285 views

Hover on Airport Data using OpenLayers + Mapfile

I need to create a simple hover using openlayers for worldwide airport data. I'm thinking maybe the associated address, maybe a picture in regards to the airport, ...anything really. It's just an html ...
0
votes
2answers
151 views

How to drag a point and then use savestrategy in OpenLayers

Im trying to use the wfs-t in openayers using the savestrategy. I have created a savestrategy and it works when I for example uses the DrawFeature Control to add a point. A new point is added to the ...
3
votes
2answers
925 views

ArcGIS local server using javascript api still does http gets to services.arcgisonline.com (internet)

We have setup a local server hosting the ArcGIS server software (10.1). We installed the ArcGIS JavaScript API on the same local server. Our goal is to supply maps when the client has no internet ...
0
votes
1answer
147 views

How to get the last drawn point for a Geometry in openlayers

I wonder if I can get the position of the last point for a geometry in openlayers? For example, I have an OpenLayers.Geometry.LineString, how to get its last point? Clarification in the comments: In ...
1
vote
2answers
947 views

converting UTM - Decimal Degrees with javaScript or using a web service

I am creating a wildlife survey form that has a field where users enter location. Users will be able to enter location using a map (i.e. draggable pushpin) or by manually entering lat/lng. My clients ...
1
vote
1answer
288 views

OpenLayer and not well formed Json

I am learning to use GeoExt and OpenLayers, and I want to reproduce one of the examples given at the geoExt website. The script call a GeoJSON containg the position of Alp summits. I downloaded it via ...
5
votes
1answer
937 views

How to programmatically change the timeExtent of a Map & update the timeSlider?

I am developing with the ArcGIS JavaScript web API and ArcGIS server 10.0. I have a time-aware layer in in my map, and also a timeslider. The full time extent of the map is a year, with data every ...
0
votes
1answer
63 views

Can I modify a layer which is uploaded by myself?

I first uploaded a geojson type polygon to the OpenLayer. Can I still edit the feature of this layer? Here is the code I am using: (It can upload the geojson layer but can not edit it) var ...
1
vote
2answers
2k views

Loop over features of a GeoJSON object from CartoDB

I have just little knowledge about HTML and JavaScript. Nevertheless I was playing, copying and pasting around with Leaflet and CartoDB. I want to display the features GeoJson in a table. This is ...
0
votes
1answer
268 views

How can I clean up this OpenLayers code by correctly doing a transform or projection, for an array of features?

I have some features I've created via some Kml data. Now, to display these features on a Google Map, I need to project them from 'EPSG:4326' to 'EPSG:3857'. This works great. Now, i need to convert ...
0
votes
0answers
598 views

Openlayers Vector Feature label not Visible in IE 8 but visible in Google Chrome…?

I have created a WEB MAP using Openlayers-Geoserver-Postgis.... The Label of one of the Vector feature layer is not visible in Internet Explorer 8(IE 8) ,but clearly visible in Google Chrome ...
3
votes
1answer
432 views

Mapping latlng values to a point on a HRAP grid

I have a copy of some NWS rainfall data loaded into a PostGIS database. Given a lat lng point, I want to find the rainfall for that given day. The original data are in XMRG format and projected ...
1
vote
1answer
1k views

Probleme with WFS protocol in OpenLayers

Sorry for disturbing. I know my problem look common, but I really don't know what to make. Here is my code for getting a WMS layer in OpenLayers from Geoserver. var wfs2 = new ...
0
votes
0answers
137 views

Is there a JavaScript SDK for Vehicle Tracking?

Does exist a JavaScript SDK for Vehicle Tracking? Like this one:Map Suite
2
votes
2answers
2k views

Apply styles to WMS layer

I am working with OpenLayers (and GeoServer) and I am showing a WMS layer with countries in a map. Each object (country) in the layer has an attribute called NAME (the name of the country). I created ...