Questions tagged [ajax]

An acronym for asynchronous JavaScript and XML)[1] is a group of interrelated web development techniques used on the client-side to create asynchronous web applications.

Filter by
Sorted by
Tagged with
2
votes
1answer
912 views

Adding a WFS with ajax from Geoserver using Openlayers3

I am trying to load vector with the following code: var sourceWFS = new ol.source.Vector({ loader: function(extent) { $.ajax('http://************/geoserver/Viva/ows', { type:...
1
vote
0answers
89 views

How to render data from ona.io in leaflet

I want to consume data from ona.io into a leaflet map on another server. I guess using the api with the format: jsonp, might be a way. I'm not sure how to use e.g. leaflet-ajax to parse the data into ...
1
vote
1answer
310 views

Generate and add L.control.layers from GeoJson properties to Leaflet

I have a problem with L.control.layer on this code, the control is added but he put another marker on top of the correct one. Naturally, I'd like to generate the layers from the results, not adding ...
1
vote
1answer
1k views

Geojson + Ajax to openlayers 3 repeated loading of data

I'm loading Geojson-data (from Postgis) to Openlayers 3 via bounding box stategy. Everything looks good. The problem ist, that the data is reloaded all the time even if no change of the boundig box ...
1
vote
0answers
90 views

coords of the previous drawned polylines are sent to PostGIS with a form when sending coords of a new drawned polyline

I have a leaflet map in which I can draw some polylines and send their data and coordinates in a PostGIS database with Ajax and Php. When I've created a polyline and send their information in my ...
1
vote
0answers
202 views

Reload after modification a WFS layer from Geoserver with AJAX

In a Leaflet map, I’m calling a WFS layer from Geoserver containing multiple polylines whith data associated stored in a PostGIS table (geometry, ...) with AJAX. Everything works fine to dispaly the ...
2
votes
1answer
1k views

MarkerCluster don't work with geojson layer in leaflet

I have created gejson layers and I want to use MarkerCluster option in one of them. But I don't know what am I doing wrong and where in my code is a problem. I tried something like this: Scripts: &...
1
vote
1answer
148 views

Displaying nonspatial data via spatial data in Leaflet

I have two pieces of data; one is nonSpatial Jobs data and one is a spatial grid (polygon that was turned into geoJson). They are being served through separate API's/ajax calls. A primary-foreign key ...
0
votes
0answers
3k views

Can Leaflet method .getBounds() be used on a layer to determine if a point is within it's bounds?

I am trying to determine if a set of points are within the bounds of a grid layer (specifically what rectangular cells are those points in) so I can highlight just those grid cells (or add a popup for ...
1
vote
0answers
274 views

How to style GeoJSON features with attributes from MySQL in Openlayers 3

I got some GeoJSON-features from a file. The attributes of the features are stored in a database (MySQL), because I need them there for some interactions with users. On the other hand some of these ...
2
votes
0answers
1k views

No 'Access-Control-Allow-Origin' header is present error when requesting json response from Geoserver

I am still working to get my GeoServer WFS displayed in my Leaflet map and cannot get the Ajax response to work properly. I have already run the "getFeature" request in my browser and it returned json ...
1
vote
0answers
372 views

OpenLayers3, WFS ajax request doesn't work

I'm creating a geoportal, which works only on my localhost. I have a problem with adding to my ol.map a vector layer from Geoserver using WFS. I'm using Geoserver v2.7, OL v3.15.1 and jQuery v2.2.4. I ...
1
vote
1answer
97 views

I am using an example fracnsites to make a similar map but I don't under stand the ajax code?

I am using an example fracnsites to make a similar map but I don't under stand the ajax code? The example has js code: var map, fields = ["gid", "createdby", "featname", "feattype", "status", "acres"...
1
vote
0answers
551 views

500 Internal Server Error:System.InvalidOperationException: Missing parameter: settlementlocationcode

Here I'm trying to bind the data from database to table for selected features within the user entered buffer distance. This is working for simple query, but it doesn't work for query using PostGIS ...
3
votes
1answer
860 views

How can I load GeoJSON from URL to leaflet? [closed]

I want to use leaflet's L.GeoJSON to load the GeoJSON from my URL. I have tested to use leaflet-ajax plugin and it worked. The codes as follow: <link rel="stylesheet" href="http://cdn.leafletjs....
0
votes
1answer
509 views

Zoom to all points in arcgis js api

Can anybody tell me what wrong in this code. Here I am passing point geometry to query task : JS code : var districtName = $('#ddlDistrictd').val(); function showresults() { $.ajax({ ...
2
votes
0answers
141 views

Geoserver wfst ajax call

I am writing a feature into postgis behind geoserver using wfst and using jquery ajax call. When the user is authenticated it successfully adds a feature. When user is not authenticated it still ...
1
vote
1answer
630 views

geojson data not rendering with openlayers in geodjango

map.html javascript code var map = new ol.Map({ layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }) ], target: 'map', view: ...
1
vote
0answers
290 views

Error: parseResponse was not called [closed]

I have a an OL3 / geoserver application. Some of my WMS layers have cql_filter. I get the error in the title when trying to select features by doing request=GetFeature. What I have to do is issue ...
0
votes
1answer
273 views

Accessing GeoServer 2.8.0 on Debian 8 using Tomcat 8?

Not been able to access my GeoServer with JavaScript. The Leaflet code running natively works in other JavaScript/HTML pages which connect on-line GIS servers. Added the following to web.xml: <...
1
vote
0answers
205 views

Ajax parameters to arcGIS's find Address

I write a ajax to consume the arcGIS services to return json results, I have tried so many way for the findAddress function parameter, non seems work, plese help. Below is my code: function ...
0
votes
0answers
354 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
4
votes
2answers
19k views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...
1
vote
0answers
586 views

How to replace accented characters in the CQL filter, using GeoServer?

I have GIS API based on OpenLayers and GeoServer. I want to perform an Ajax request in order to get all the features that have a given keyword. For example, I could use the CQL filter: name LIKE '%...
1
vote
0answers
151 views

Leaflet inbuild AJAX methods for WMTS getCapabilities request

I was wondering whether the Leaflet library has inbuilt methods to make AJAX requests. My goal is to create a plugin that makes an XMLHttpRequest request to a specified WMTS resource and parse the XML ...
1
vote
1answer
3k views

Loading GeoJSON via AJAX after adding Layer to OpenLayers 3?

I'm trying to add a new GeoJSON layer to OpenLayers 3 that I have to fetch via AJAX. I want the user to click on a list of layers, have it add an empty vector layer, and then make an AJAX call and ...
0
votes
1answer
2k views

Request JSONP from Geoserver using AJAX request in Openlayers 3

I am creating a web application using OpenLayers 3 and I am looking to import my vector layers into this. I currently have my data in Geoserver and I am trying to use the following code, but when I ...
1
vote
0answers
304 views

Openlayers 3, jquery Ajax initialising in Jquery.success()

I have this nice fiddle: http://jsfiddle.net/mindsupport/cujfjby4/14/ Openlayers 3 map initialized in ajax request and all data (points, line etc.) attached in jquery success() method, but map doesn'...
2
votes
1answer
2k views

Fetching postgis data through php json and passing to leaflet map

I am new to this and trying to explore leaflet and geojson a bit. Please help me with this. This is my php page which I am using to fetch data from PostGIS. (the data opened successfully in the ...
1
vote
3answers
870 views

Leaflet is behaving unexpectedly when trying to load more than one layer

I had a hard time trying to create a good title for my issue since it is a little hard to explain. But I will do my best. I'm trying to create a web map to show three distinct layers, each from a ...
1
vote
1answer
19k views

Waiting on AJAX result in main JS function

So .... my main init()Javascript function has these 3 lines: sarea = GetArea(Uname,UIDfield,Table, document.getElementById("Source").value); darea = GetArea(Uname,UIDfield,Table, document....
1
vote
0answers
801 views

Geoserver GetCapabilities and CORS [duplicate]

Using WMS I do a GetCapabilities request on a GeoServer instance. This works in FireFox, but not in Chrome, Safari, and Internet Explorer. The point is that in the web.xml from the server I did add: ...
4
votes
2answers
3k 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 ...
0
votes
1answer
321 views

Openlayers GetFeatureInfo not working all zoom levels

I am sending GetFeatureInfo request to wms service. My parameter is like this. When I click to map, map click event is firing and I am sending this request to server. var params = { ...
2
votes
1answer
900 views

How to append result to Geocoder text box using ArcGIS JavaScript API?

I want to append result of a custom search in a Geocoder text box in ArcGIS JavaScript API by overriding the default result. I have written the below code for this, but I am not getting a ...
1
vote
1answer
1k views

Updating leaflet L.imageOverlay using jquery serialize without page refresh?

I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I ...
1
vote
1answer
176 views

geoserver to leaflet via jsonp

Please somebody help because I am on the edge of madness:) I have no idea what is wrong with my code... Only what I want is adding layers to my leaflet map: 1 point layer, 1 line, and one polygon. ...
1
vote
0answers
252 views

Calling service web from ComboBox using JavaScript? [closed]

I want to call a web service and use it in combox for search. Here is the function that i used to call my service web: var xmlhttp = new XMLHttpRequest(); var url = "http://176.31.230.211/mtmap/...
2
votes
1answer
4k views

Adding multiple OpenLayers Vector Layer markers to map using AJAX, JSON, and jQuery?

I am attempting to parse a JSON file and place markers on an OpenLayers based map application. I am using jQuery to perform the AJAX and iteration on the JSON file. I am having a problem with the ...
2
votes
1answer
3k views

Get data to display on the map legend?

I am trying to use the Legend widget from this link below to build a legend that displays our layers in the map: https://developers.arcgis.com/en/javascript/home.html I have added the legend widget ...
2
votes
1answer
2k views

How can I load strictly tiles within the current viewport in Leaflet.js?

I have tiles that are not available for the whole map. How can I stop Leaflet.js/Mapbox.js from making requests to these tiles? There are dozens of HTTP 404's that I'd really like to get rid of.
0
votes
1answer
54 views

How do I change my title of app?

We have a map with streets as basemap. We have been trying unsuccessfully, for the last two days to change the basemap to tiled layer with no success at all. I am posting a snippet because script is ...
4
votes
1answer
34k 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 initialize(){...
3
votes
1answer
3k views

Options for getting data from SQL Server into Leaflet app?

I have polygon data in SQL Server 2012 that I need to get onto a Leaflet application - we're not talking thousands of polygons, but simplified U.S. counties where only one state will be displayed at a ...
3
votes
1answer
5k views

Request WFS from GeoServer with Jquery AJAX using INTERSECT cql_filter error

I am having difficulty troubleshooting this issue and would appreciate some ideas. Thanks in advance! I am trying to make an AJAX request from a Leaflet map with Jquery to GeoServer to return a WFS ...
0
votes
1answer
1k views

Openlayers ajax loading works on FF but doesn't work on Chrome. Any idea why?

I'm using this ajax loading panel http://thisiscontext.com/tools/jQuery-showLoading And I have the following code : jQuery('#map').showLoading(); var request = OpenLayers.Request.POST({ url:...
3
votes
1answer
1k views

GeoJSON is valid according to JSONLint but jquery gives error

I have the following GeoJSON (from webservice) { "Features": [ { "Id": "1", "Geometry": { "Coordinates": [ { "Latitude": 31.2812, ...