Stack Exchange Network

Stack Exchange network consists of 174 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
1answer
39 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
0answers
11 views

Getting Error, “Cannot read property '0' of undefined” when try to bind ajax() data into Grid

code-Js:... map.on("load", initToolbar); function initToolbar(evtObj) { map.graphics.clear(); tb = new Draw(evtObj.map); tb.on("draw-end", doBuffer); //click handler for the draw ...
0
votes
0answers
48 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
1answer
24 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
89 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
150 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
314 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
98 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
207 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
565 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
671 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
242 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
395 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
71 views

How to draw the last feature in geojson file on leaflet map?

I have a geojson file that is updated by 1 minutes interval. Each minute a new line is appended at the end of this geojson file. This new line corresponds to a point feature that is received from a ...
0
votes
0answers
62 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
359 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
1k 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
473 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
397 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
667 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, ...
0
votes
0answers
233 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
351 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
435 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
832 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
610 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
695 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
371 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
1answer
258 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
510 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
411 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
281 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
702 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
77 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
267 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
951 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
62 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
166 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
829 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
117 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
2k 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
233 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
331 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
0answers
66 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
438 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
702 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
409 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
127 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
545 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
196 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 ...