Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rootUrl = 'http://localhost:8080/geoserver/wfs';
- var defaultParameters = {
- service: 'WFS',
- version: '2.0.0',
- request: 'GetFeature',
- typeName: 'acme:pand',
- maxFeatures: 200,
- outputFormat: 'application/json',
- srsName:'EPSG:28992'
- };
- var parameters = L.Util.extend(defaultParameters);
- var URL = rootUrl + L.Util.getParamString(parameters);
- var WFSLayer = null;
- var ajax = $.ajax({
- url : URL,
- dataType : 'json',
- jsonpCallback : 'getJson',
- success : function (response) {
- WFSLayer = L.geoJson(response, {
- style: function (feature) {
- return {
- stroke: false,
- fillColor: 'FFFFFF',
- fillOpacity: 0
- };
- }
- }).addTo(mymap);
- }
- });
Add Comment
Please, Sign In to add comment