Comments (6)
Hello.
WFS layer extends L.FeatureGroup layer and have all its methods and events. You can use .bindPopup or onclick event as in quick start guid. I check this and its work
var boundary = new L.WFS().addTo(map).bindPopup('I am popup')
or
var popup = new L.Popup();
boundaries.on('click', function(e){
popup
.setLatLng(e.latlng)
.setContent('You clicked on boundary layer at '+ e.latlng.toString())
.openOn(map);
});
Also you can use Leaflet.ToolBar plugin as we did in polygon example
from leaflet-wfst.
Thanks for getting back to me.
I actually tried .bindPopup(feature.properties.id) but the console gave
an error saying:
Uncaught ReferenceError: feature is not defined
Is it possible to access features properties?
On 24 Jun 2015 8:30 pm, "kuzkok" [email protected] wrote:
Hello.
WFS layer extends L.FeatureGroup layer and have all its methods and
events. You can use .bindPopup
http://leafletjs.com/reference.html#featuregroup-bindpopup or onclick
http://leafletjs.com/reference.html#featuregroup-click event as in quick
start guid http://leafletjs.com/examples/quick-start.html. I check this
and its workvar boundary = new L.WFS().addTo(map).bindPopup('I am popup')
or
var popup = new L.Popup();
boundaries.on('click', function(e){
popup
.setLatLng(e.latlng)
.setContent('You clicked on boundary layer at '+ e.latlng.toString())
.openOn(map);
});Also you can use Leaflet.ToolBar
https://github.com/Leaflet/Leaflet.toolbar plugin as we did in polygon
example http://flexberry.github.io/Leaflet-WFST/examples/polygon.html—
Reply to this email directly or view it on GitHub
#8 (comment)
.
from leaflet-wfst.
It appears not, as its a FeatureGroup and has a shared bindPopup method.
Is there a way of getting the data into a L.geoJson layer?
from leaflet-wfst.
There is no way to get L.geoJson layer in this plugin. You can access to layer feature in onclick event:
boundary.on('click', function (e) {
popup
.setLatLng(e.latlng)
.setContent('You clicked at '+ e.layer.feature.id)
.openOn(map);
});
but now it's not work with "Multi" classes such as MultiCurve and MultiSurface
from leaflet-wfst.
That's great thanks. Exactly what I needed.
On 25 Jun 2015 07:44, "kuzkok" [email protected] wrote:
There is not way to get L.geoJson layer in this plugin. You can access to
layer feature in onclick event:boundary.on('click', function (e) {
popup
.setLatLng(e.latlng)
.setContent('You clicked at '+ e.layer.feature.id)
.openOn(map);
});but now it's not work with "Multi" classes such as MultiCurve and
MultiSurface—
Reply to this email directly or view it on GitHub
#8 (comment)
.
from leaflet-wfst.
example at http://flexberry.github.io/Leaflet-WFST/examples/popup.html
from leaflet-wfst.
Related Issues (20)
- Add viewParams option
- Manual/offline installation HOT 1
- WFS problems HOT 2
- wfs cql
- Editing field attributes using the Leaflet-WFST plugin
- opengeo.org is down
- Error: Geometry field 'Shape' doesn' exist inside received feature HOT 1
- can it work with arcgis server wfs-t service? HOT 1
- Stuck in disable map interaction mode HOT 1
- Getting 401 error HOT 1
- need multi-filter,it seems that wfst don't support。 HOT 1
- Uncaught TypeError: Cannot read property 'value' of undefined HOT 2
- Update links in tasmania.html HOT 3
- Update links demo.opengeo.org to geoserver.ics.perm.ru HOT 1
- bounds are not valid HOT 1
- Inserting Polygons to PostGIS database HOT 1
- how to authenticate? HOT 2
- Provide more docs about the plugin constructor
- Highlights (Mouseover, mouseout, click)
- Possible to label WFST layer? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-wfst.