Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. var gad = new ol.source.GeoJSON({
  2. 'projection': map.getView().getProjection(),
  3. url: 'http://localhost:8080/geoserver/wfs?DATASTORE=Framework&service=wfs&version=2.0.0&request=GetFeature&typeName=opengeo:addr_to_geocode&outputFormat=application/JSON'
  4. });
  5.  
  6. var gad3 = new ol.layer.Vector({
  7. title: "Name",
  8. source: gad,
  9. style: new ol.style.Style({
  10. image: new ol.style.Circle(({
  11. radius: 3,
  12. fill: new ol.style.Fill({color: 'yellow'})
  13.  
  14. }))
  15. })
  16. });
  17. map.addLayer(gad3);
  18.  
  19. The layer http://localhost:8080/geoserver/wfs?DATASTORE=Framework&version=1.1.0&typeName=cite:tropics&outputFormat=application/JSON&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=sf:restricted&SRSNAME=EPSG:26713&username=admin&password=geoserver is not a valid layer and can not be added to the map.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement