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
76 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
10 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
43 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
1answer
34 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
33 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
30 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 ...
0
votes
0answers
188 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
58 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
131 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
76 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
34 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
114 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
110 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
177 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
30 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
654 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
187 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
252 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
497 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
141 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
553 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
1answer
618 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
207 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
403 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
703 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
893 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
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 ...
0
votes
0answers
100 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
554 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
966 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
523 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
0answers
333 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
495 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
514 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
1k 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 ...
3
votes
1answer
992 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');?>",{ ...
5
votes
1answer
815 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
455 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
337 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
604 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
518 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
375 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
859 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
85 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
304 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 ...