Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
14 views

CORS Error while fetching data from GeoSever [duplicate]

I am trying get data from GeoSever WMS layer using GetFeatureInfo it returns HTML format data. In browser I am getting response, but when I am trying fetch from application getting CORS error. Below ...
0
votes
0answers
35 views

Pushing features to external GeoJSON file

I am working on a project which uses Leaflet and leaflet.draw to show and draw shapes on the map. I also have a data.json file which I use to display former features generated from geojson.io. What I ...
0
votes
0answers
32 views

Search the PostGIS database to display the result in a table then highlight it on the OpenLayers map by id [on hold]

We did a search in the database according to certain search criteria, we displayed the results in a table by ajax request directly from the database. My problem is now I can not highlight on the map ...
0
votes
1answer
49 views

Searches by area names in OpenLayers with request of AJAX in the PostGIS database

We built a GeoJSON: {"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154....
1
vote
1answer
38 views

Load data from URL to update Billboard position Cesium

I am trying to update the position of a billboard every second in Cesium. The issue is I cannot pass the updating points to the billboard coordinates. I am using jQuery to load the data. This is what ...
0
votes
0answers
36 views

View GeoJSON data after clicking on the OpenLayers map

I'm trying to make a piece of code that when I click on the map to return GeoJSON property data that I clicked on. I tried this way: map.on('click', function(e){ //console.log(evt); //...
0
votes
1answer
23 views

Request a Ajax with GET to remove one or more geometries in OpenLayers

I have a html selection of the form: <table class="table"> <tr> <td> <label>Afiseaza:</label><br /> <select id="layer" onchange=...
0
votes
0answers
54 views

Leaflet custom icons and popups showing GeoJSON properties with external data?

How can both custom icons and geojson properties be implemented with external geojson in Leaflet? Using methods described in answers to two other questions, both using inline geoJSON: Using custom ...
0
votes
2answers
39 views

Executing functions after multiple data sources have been loaded in Leaflet AJAX

I have a leaflet map that takes in data from multiple sources via the LeafLet Ajax plugin. I want to execute certain functions only after ALL the data has been loaded, not just one layer. The data ...
0
votes
2answers
49 views

Displaying GeoJSON using Ajax and Leaflet?

I have been trying for days to load a GeoJSON file using Ajax and Leaflet. I can get the map & index.html to load using an Apache server and such but the GeoJSON itself does not show up. Here is ...
0
votes
1answer
21 views

Why is this happening? I show GeoJSON some coordinates with OpenLayers by request Ajax

I want to display a GeoJSON on OpenLayers with a request from Ajax from the database: I store in the geojson variable all the information and I icercated in two ways: 1. Directly from the already ...
0
votes
2answers
195 views

Get GeoJSON from a database by the AJAX method for OpenLayers

I have this code: if (ol.proj.proj4 && ol.proj.proj4.register) { ol.proj.proj4.register(proj4); } var features = new ol.format.GeoJSON().readFeatures( $.ajax({...
1
vote
2answers
92 views

Uncaught SyntaxError: Unexpected token < (Geoserver popup in leaflet using ajax)

I am trying to show attribute information of features in a popup from my postGIS db tables via Geoserver WMS. I have successfully been able to add these layers to the map. However, when I try to grab ...
0
votes
1answer
144 views

FitBounds after L.GeoJSON.AJAX has loaded

I am making a Leaflet 1.3.4 map that will show members based on category. I have a php file "cs.php" that queries a MySQL and returns an option menu of distinct categories. When a category is selected ...
1
vote
0answers
401 views

How to update the markers in real-time using ajax

I am facing some problem where the markers is not being updated when the values in the database changes(i am using a stored procedure which get the latest location based on the timestamp). ...
0
votes
2answers
75 views

Different Icon per feature with Leaflet Ajax

How can I have a circle marker or one of a selection of icons depending on a feature's properties using LeafletAjax? https://github.com/calvinmetcalf/leaflet-ajax function pointToLayer(feature, ...
1
vote
1answer
334 views

How can I show a popup in a map, using Leaflet?

How can I show a popup in a map, using Leaflet, loading the markers from an GeoJSON external file? function onEachFeature(feature, layer) { if (feature.properties && feature.properties....
0
votes
0answers
276 views

Uncaught TypeError: L.GeoJSON.AJAX is not a constructor - Error in geodjango

I am following Wanjo Hikibui's excellent guide to GeoDjango At the end of part 5, I am getting the same error, but I don't know how to fix it, as the solution in the video was not sufficient, and it ...
0
votes
1answer
513 views

Displaying geojson polygon in leaflet imported with ajax

I'm having difficulty displaying a simple polygon in leaflet. I'm unsure if my syntax is bad or if I'm importing the geojson incorrectly. I'm using the ajax plugin from calvinmetcalf and add the js ...
1
vote
2answers
152 views

How to import a WFS layer using leaflet.ajax and qgis server?

I try to create a story map using the application developed by Jakob Zhao https://github.com/jakobzhao/storymap. For import WFS layer, with leaflet.ajax, he write : var layers = { 'layer 2': [ L....
0
votes
1answer
299 views

input data coordinates to database from input data inside leaflet js

i have a problem with my update data coordinates form leaflet popup. i just want to make edit form inside leaflet popup. if i click marker in a map it shown coordinate with input form, if the building ...
1
vote
0answers
660 views

Response not working in AJAX/PHP

I am working on Google Maps API, where I have made a dynamic marker popup. Now I want to take the user information from the popup and save it to my MySQL database without reloading the page. So I am ...
0
votes
1answer
1k views

Leaflet create marker from ajax call data

Get all the basic works with Leaflet and want to add markers using ajax call $("button").click(function(){ $.get("GetLocationsServlet", function(data){ markers = data.split(";"); ...
1
vote
3answers
524 views

CORS error when using Google Elevation API

I'm trying to use Google elevation API with an AJAX request. It doesn't work and when I do console.log(ajax.responseText) I'm getting this error : Cross-Origin Request Blocking: The Same Origin ...
2
votes
1answer
822 views

Reading geojson into Leaflet results in error?

I'm trying to read a geojson file into leaflet. Everything works out when I copy the text from the geojson file and paste it into var data = { } So I think the file should be ok for leaflet. But I ...
0
votes
0answers
84 views

Using WMSGetFeatureInfo() of OpenLayers in Firefox?

I'm trying to read features from the response of an AJAX request using new ol.format.WMSGetFeatureInfo().readFeatures(parameter).The response format is application/vnd.ogc.gml (XML). The thing is that ...
0
votes
1answer
448 views

How to cluster external geojson (using leaflet.ajax.js)?

Understand the method of marker clustering but unable to find the right solution for external geojson. I have tried various cluster plugins but nothing seems to work. See example map here. var ...
0
votes
1answer
2k views

L.geoJson() - Error: Bounds are not valid

I am iterating through an array of zipcodes and passing each to Mapbox Geocoding API. With every iteration, on success, I pass to L.geojson(). After the last iteration I call map.fitBounds(jsonLayer)....
1
vote
1answer
745 views

Getting WFS data from Geoserver

I found an upload example to load WFS data from geoserver into a GeoJson layer in leaflet. I I adapted it to my case. I have read similar topics from this site and this other site, but I can not ...
0
votes
1answer
459 views

Ajax file url inside flask app

My ajax request for a geojson works fine as a static web app $.getJSON("myfile.geojson", function (data) { theaters.addData(data); map.addLayer(theaterLayer); }); I am trying to wrap the ...
3
votes
1answer
909 views

Geoserver Printing Module | MapFish print service won't print

I followed this documentation to use the printing service in geoserver. I want to print the map layer in pdf format. Below is my index.html for displaying the map and a button to print the map, ...
1
vote
0answers
301 views

Openlayers, add new ol.layer.Tile after AJAX 'done'

I'm trying to add an additional ol.layer.tile on my existing map view after a 'status' 'done' Ajax post call. I have tried to use "async" and "await" on initialize the ol.map. A sample code is below: ...
0
votes
1answer
424 views

Adding a drawn layer to a layer group dynamically

I am trying to save a layer drawn using OpenLayers 3.9 and add it to the map and list it using ol3-layerswitcher. The layer is being saved and can be accessed through the GeoServer using WMS. ...
0
votes
1answer
480 views

ajax request of wiki API in google maps infowindow

Hello guys I am stuck in the last part of a project. I have a project were I have infowindows for every marker when the marker is clicked a function "populateInfoWindow" is called. In that function ...
0
votes
2answers
984 views

Create a table from GeoJSON Data from Ajax link - Using Leaflet Javascript

I have an ajax link getting data from GeoServer. When a user selects features on a map, a new bounding box is calculate and sent via Ajax to GeoServer and the features within that bounding box are ...
2
votes
1answer
794 views

Wait until geoJSON ajax call completed

I use the codes below to make an ajax call requesting points and show it on the map: var layer_kos = new L.GeoJSON.AJAX("<?php echo base_url('assets/GIS/layer/request_kos.php');?>",{ ...
4
votes
1answer
746 views

Add multiple WFS layers to Leaflet map from GeoServer using JQuery Ajax calls

I am attempting to add multiple WFS layers from GeoServer into a Leaflet map using JQuery ajax calls. It works if I set async: false, but this is deprecated and should not be used. If I remove async:...
1
vote
0answers
411 views

How to send data parameter on leaflet-ajax

i have a problem about sending data parameter to leaflet ajax, i'm using https://github.com/calvinmetcalf/leaflet-ajax anyone know how to send data parameter ? i have reading documentation but did't ...
0
votes
2answers
304 views

How to use Twitter Typeahead with GeoServer WFS?

I'm trying to configure the Twitter Typeahead library to work with a GeoServer WFS layer, so I can create an auto-complete feature search function. Typeahead has the Bloodhound suggestion engine, ...
1
vote
1answer
557 views

Collect external geojson from user and pass to L.GeoJSON.AJAX()

I am aware that I can use leafet ajax to add an external geojson to a leaflet map like such... var geojsonLayer = new L.GeoJSON.AJAX('c:/data/map/sample.geojson'); geojsonLayer.addTo(map); ...
3
votes
2answers
468 views

GeoJSON interaction with leaflet

I want to list GeoJSON on map as well on the div element outside the map but I'm somehow stuck. Using this block of code I did manage to create some sort of interaction between map and div element ...
0
votes
1answer
334 views

Updating feature in ArcGIS REST service with Ajax?

I have to modifiy an app. This app must update and add data to feature in an ArcGIS Server service. I know that with ArcGIS JavaScript API is very easy but this app is build with Leaflet and others ...
2
votes
1answer
787 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
82 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
290 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
77 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
177 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
131 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 ...