Guest User

Untitled

a guest
Jan 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. var rootUrl = 'http://localhost:8080/geoserver/wfs';
  2.  
  3. var defaultParameters = {
  4. service: 'WFS',
  5. version: '2.0.0',
  6. request: 'GetFeature',
  7. typeName: 'acme:pand',
  8. maxFeatures: 200,
  9. outputFormat: 'application/json',
  10. srsName:'EPSG:28992'
  11.  
  12. };
  13.  
  14. var parameters = L.Util.extend(defaultParameters);
  15. var URL = rootUrl + L.Util.getParamString(parameters);
  16.  
  17. var WFSLayer = null;
  18. var ajax = $.ajax({
  19. url : URL,
  20. dataType : 'json',
  21. jsonpCallback : 'getJson',
  22. success : function (response) {
  23. WFSLayer = L.geoJson(response, {
  24. style: function (feature) {
  25. return {
  26. stroke: false,
  27. fillColor: 'FFFFFF',
  28. fillOpacity: 0
  29. };
  30. }
  31. }).addTo(mymap);
  32. }
  33. });
Add Comment
Please, Sign In to add comment