Questions tagged [ajax]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

map.getView().fit(vectorLayer.getSource().getExtent(), map.getSize()); is not working

I would like to know how to get all multipolygon features i.e all districts features display on my web map when I select state from dropdown list. This is the query i wrote to get all districts ...
Mounikareddy's user avatar
0 votes
1 answer
53 views

Leaflet.markercluster with GeoJSON via AJAX [closed]

I am pretty new to this. Have found a similar question here but I have been unable to implement it in my own case. The markers show up just fine but no clustering happens. function onEachFeature(...
SoranDK's user avatar
  • 11
2 votes
1 answer
173 views

Creating Proportional Symbols with Leaflet

After converting the data in this table to geojson, I want to present it on the map by sizing it according to the "y_2021" values, but I get many errors like in the picture. Can you help me ...
T..'s user avatar
  • 23
0 votes
0 answers
90 views

Problems with connection GeoServer - AJAX in web map code

I'm trying to create a WFS connection to show a layer in a Leaflet map, but the layer isn't uploading. I supposedly have correctly employed the code (I've been testing the code with another GeoServer ...
Joaquin87's user avatar
0 votes
1 answer
135 views

Can't get OpenLayers vector layer to display (loaded by AJAX)

I can't get the vector layer (loaded by AJAX to display). Spot my error? I confirmed the GeoJSON returned by the server is correct. var vectorLayer; function showMap() { var fill = new ol.style....
user44021's user avatar
2 votes
1 answer
339 views

Multiple WFS layers in Leaflet, loaded with Ajax with bounding box, do not display correctly

The following example is a code for three WFS layers on Leaflet, loading only inside a Bounding box in order to save resources. Layers can be turned on in the Layer Control as featurelayer1, ...
Vincent Dc's user avatar
0 votes
1 answer
633 views

Converting from esoteric coordinate systems to EPSG:4326 WGS 84

I have a shapefile with coordinates in the "EPSG:3081 NAD83 / Texas State Mapping System" coordinate system. I'd like to be able to convert these to EPSG:4326 WGS 84 and it's not clear how. ...
neubert's user avatar
  • 338
3 votes
2 answers
281 views

"Unsupported GeoJSON type" from AJAX request to PostGIS database

I'm trying to use a GeoJSON to build a layer on an OpenLayers map of MultiPolygons from my PostGIS database. However the following error is thrown: Uncaught Error: Unsupported GeoJSON type: undefined ...
DandozWar's user avatar
0 votes
1 answer
321 views

Dynamically adding lat, lon filter to WFS request in Leaflet

I want to run my wfs_url for all the points/cities returned by:-https://demo.pygeoapi.io/master/collections/ogr_gpkg_poi/items?f=json request? such that my result will show the no of earthquake data ...
Walker's user avatar
  • 173
1 vote
1 answer
890 views

Uncaught Error: Unsupported GeoJSON type: undefined - Openlayers

I get a valid geojson from the database using a query. Below one is the php script used to read the data. <?php include "../includes/init.php"; // including data base connection $sql = &...
Hashan hemachandra's user avatar
0 votes
0 answers
281 views

AJAX Request (Point Feature, Format GML) with fetch API from WFS failed

I work with OpenLayers 6.9.0. Individual polygon and point features are displayed on the map with a GetFeature request via WFS. The WFS delivers GML, no GeoJSON. Points and polygons come from the same ...
TommyP's user avatar
  • 1
0 votes
0 answers
42 views

Resolve CORS policy error while fetching layer name from GeoServer using AJAX [duplicate]

I want to fetch all the layer names from GeoServer using AJAX and append the data in the HTML dropdown. I used xampp server and file in .php extension, Here is my code : HTML code : <label for=&...
Taranpreet Singh's user avatar
0 votes
1 answer
150 views

General JavaScript function handling popups of various JSON layers in a Leaflet map

I have a couple of JSON layers added to my Leaflet map via the leaflet-ajax plugin. lyrBldgs = new L.GeoJSON.AJAX('data/bldgs.geojson', {style:stlBldgs, onEachFeature:popOSM}).addTo(mymap) lyrLanduse =...
BallpenMan's user avatar
  • 1,219
1 vote
1 answer
275 views

Problem with put sld in geoserver

I want to send SLD to GeoServer via AJAX: this is my SLD as XML format: <?xml version='1.0' encoding='UTF-8'?> <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://...
hamed's user avatar
  • 101
1 vote
0 answers
224 views

Google Reverse Geocoding API doesn't work on mobile internet

I was able to get Google Geolocations and Geocoder API to work via desktop and on my phone when its connected to wifi, but when I disconnect from the wifi, geocoder doesn't display the results. just ...
jgax87's user avatar
  • 111
2 votes
1 answer
564 views

BBox and GetFeature

I have connected my PostGIS data to GeoServer and I want to GetFeature with a OpenLayers user created BBox. I have implemented a BBox to my app like this: var select = new ol.interaction.Select(); map....
Dionisis Kotzaitsis's user avatar
1 vote
2 answers
1k views

Popup for each feature when using Leaflet marker.cluster plugin

I have leaflet map to display locations of points. Firstly, I use leaflet.ajax plugin to load the points data in GeoJSON format, then I want to enable cluster view using the Leaflet.markercluster ...
Scorpioooooon21's user avatar
-1 votes
1 answer
176 views

Bind selected (Algolia suggested) with queried wordpress search terms from db (ajax, json etc)

Since the Wordpress plugin that facilitates this functionality has been deprecated i have decided to leverage the places API https://community.algolia.com/places/examples.html#searching-in-a-country ...
john zuh's user avatar
0 votes
0 answers
385 views

Leaflet only allows polygon layer from GeoJSON to be displayed one time

I have used an AJAX call to load a Black Sea GeoJSON that I want to display as a polygon on the map. var blackSea = []; var blackSeaData = new L.GeoJSON.AJAX("./blacksea.json"); blackSea....
Theodcyning's user avatar
1 vote
1 answer
215 views

How to tie an ArcGIS Server QueryTask result back to the calling layer?

Using ArcGIS Server JS API 4.x I'm running a series of QueryTasks in succession, and need to tie the result of the query back to the calling layer. However, since the QueryTasks execute asynchronously ...
Stephen Lead's user avatar
0 votes
2 answers
2k views

Error adding layer to control on web map using Leaflet

I want to add GeoJSON data to my map, but get an error: Uncaught TypeError: Cannot read property 'setZIndex' of undefined $.ajax({ url:'load.php', type:'POST', data:{state:"",lga:"",raw:""}, ...
user2999227's user avatar
1 vote
1 answer
302 views

WFS layer from GeoServer with OL4 - String index out of range error

I need to load a WFS layer from GeoServer 2.8 to a web app using OpenLayers 4.6.5 and JQuery 2.2.3 so that I can use Select to highlight a feature on click. I can preview the line layer as a WMS with ...
JasonBK's user avatar
  • 600
3 votes
1 answer
2k views

Why doesn't Leaflet have cross-origin error when adding WMS layer from GeoServer, but GetFeatureInfo using ajax does

I am learning web mapping with Leaflet. I added a WMS layer and now I'm trying to get feature details using ajax to send getFeatureInfo request. I'm not finished yet, and right now I just want to log ...
Sara's user avatar
  • 401
1 vote
0 answers
225 views

Prevent results of GetGeometry from disappearing after AJAX call

In my ongoing mission to try to find a way to zoom into a specific area of a map (in this case a DMA), I am first trying to get the coordinates of a selected point that will be accessible to me for ...
user3003374's user avatar
1 vote
2 answers
1k views

Leaflet Feature bindpopup does not display (OnEachFeature)

I am attempting to have a click event popup with some data pulled from Wikipedia and displayed on my Leaflet map for each point that displays GeoJSON data. My data is displayed on map as you can see ...
KullideDev's user avatar
2 votes
1 answer
3k 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 ...
Ludovico Frate's user avatar
1 vote
0 answers
108 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, ...
abbkr1er's user avatar
0 votes
0 answers
1k 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" --...
Ayoub Beltarchi's user avatar
3 votes
0 answers
341 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 ...
NicholasCAMAvision's user avatar
2 votes
1 answer
2k 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 ...
Nabil Faska's user avatar
0 votes
1 answer
1k 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 ...
ali's user avatar
  • 21
1 vote
1 answer
685 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)...
indeedme's user avatar
0 votes
0 answers
913 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 ...
Silvio Progonati's user avatar
0 votes
1 answer
183 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....
CoderCoder42's user avatar
1 vote
1 answer
1k 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 ...
Owen's user avatar
  • 63
0 votes
0 answers
637 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); //...
CoderCoder42's user avatar
0 votes
1 answer
490 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=...
CoderCoder42's user avatar
1 vote
0 answers
374 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 ...
Carpintonto's user avatar
1 vote
2 answers
755 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 ...
Dhaval Shukla's user avatar
0 votes
2 answers
5k 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 ...
OBMGIS's user avatar
  • 1
0 votes
1 answer
93 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 ...
CoderCoder42's user avatar
0 votes
2 answers
5k 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( ...
CoderCoder42's user avatar
1 vote
2 answers
1k 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 ...
DigitalPatwari's user avatar
1 vote
1 answer
2k 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 ...
dnevels's user avatar
  • 123
2 votes
0 answers
1k 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). ...
Lee Yue Loong's user avatar
1 vote
2 answers
594 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, ...
Will's user avatar
  • 143
1 vote
1 answer
3k 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....
Antonio's user avatar
  • 11
2 votes
1 answer
2k 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 ...
user2059737's user avatar
1 vote
2 answers
584 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....
Zacharie Moulin's user avatar
1 vote
0 answers
1k 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 ...
Avik Betal's user avatar