Przeglądaj źródła

added maxFeatures to js GetFeature

Piotr Labudda 8 lat temu
rodzic
commit
719d632da3
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      SE/static/p5WFS/GetFeature.js

+ 3 - 1
SE/static/p5WFS/GetFeature.js

@@ -83,7 +83,9 @@ function p5WFS_GetFeature(typeName, query) { // @returns Promise
 		postData = query['ogc:Filter']
 	}
 	if ('sortBy' in query) link += '&sortBy=' + query['sortBy']
-	var method = (postData) ? 'POST' : 'GET' // TODO: if long 'ogc:Filter' then POST
+	if ('maxFeatures' in query) link += '&maxFeatures=' + query['maxFeatures']
+	if ('count' in query) link += '&count=' + query['count']
+	var method = (postData) ? 'POST' : 'GET'
 
 	return window.fetch(link, Object.assign({
 		method: method,