We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1
vote
1answer
72 views

Heatmap with GeoJSON, Leaflet and Leaflet.heat plugin

I'm using the Leaflet.heat plugin to create an heatmap in Leaflet. I've some problem with GeoJSON data that I've loaded through a WFS service on GeoServer. I used the function geojson2heat to get the ...
1
vote
0answers
28 views

ajax don't retrieve fully php request response

I'm facing challenge with ajax response in my code: // ********* PHP code (LoadData.php) **************** <?php include 'Connexion.php'; $requete="SELECT id, pkuid, province, nom, prenom, tel, ...
0
votes
0answers
104 views

curl REST API to AJAX

I'm trying to make a web application that is able to : 1) Upload raster data to GeoServer so when I use this command on cmd it works curl -u admin:geoserver -v -XPUT -H "Content-type: image/tiff" --...
3
votes
0answers
56 views

Displaying QGIS's “Map Tips” in OpenLayers?

Still a little new to QGIS and Openlayers. How would you display QGIS's "Map Tips" into OpenLayers? I am currently using QGIS 2.18 and have the latest update in Openlayers. In QGIS, I have created 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....
0
votes
1answer
479 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 ...
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
102 views

Show points (layer) from PostgreSQL database on OpenLayers map

I have this code, I want to load a collection of points stored in a table in PostgreSQL database, I retreive the GeoJSON format succesfully, but the points never show up on the map! The three files ...
0
votes
0answers
11 views

showing GeoJSON result on googlemap [duplicate]

I want to get some point (in Geometry type) from my sql database with AJAX and show them on googlemap my table name is location_flat which has a column named position conatained my geometry points. ...
0
votes
1answer
119 views

Showing GeoJSON result on Google Maps [closed]

I have some points result query in MySQL database which is GeoJSON and I want to show these points on a Google map. I need to get this result with AJAX and deliver them to Google Maps. Can anybody ...
1
vote
2answers
192 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
44 views

Leaflet put coordinates of every point in array

I get points using GeoJSON.AJAX and I want to store coordinates in array to pass it later to function that builds routes between points. Now I use this code <script> function our_layers(map)...
0
votes
0answers
56 views

Submit form in leaflet popup makes blank page

I have a problem with a leaflet popup. I made a form in it and when I try to send form with jquery & AJAX to postgis, data inserts correctly but blank page loads. How to update popup with response ...
0
votes
0answers
72 views

Multiple point add in OpenLayers maps with ajax request

I want to display multiple points in the database on the OpenLayers map. Points are in the form of gps coordinates. Here is the code that we have done so far: <?php $con = mysqli_connect("...
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 ...
1
vote
2answers
245 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
0answers
259 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
1answer
64 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
277 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 ...
1
vote
3answers
1k 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 ...
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"...
0
votes
1answer
59 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
123 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
0answers
136 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 ...
1
vote
2answers
169 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
269 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
2answers
383 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, ...
0
votes
2answers
1k 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({...
0
votes
1answer
33 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
1answer
317 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 ...
0
votes
1answer
687 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
1answer
695 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....
1
vote
0answers
541 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). ...
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
1k 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 ...
1
vote
1answer
1k 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 ...
1
vote
2answers
241 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....
1
vote
0answers
729 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
2k 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(";"); ...
0
votes
1answer
536 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 ...
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
899 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 ...
0
votes
1answer
645 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
0answers
110 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
3k 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)....
3
votes
2answers
588 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
397 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 ...
0
votes
1answer
573 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
1k 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
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 ...