New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions #78
Comments
Hi, thanks for the ideas. I'm a bit wary of adding too many options as they all need to be configured which is going to get confusing for users (the config dialog is getting a bit too crowded already...) but...
So I would say the priority order is |
|
Hi,
although I've done this in my private branch, my PR's track record are quite embarrassing to offer my help again.... :-( |
Your PR was probably fine... - if I was on later leaflet and you had actually tried it against the shipped version :-)... There is a branch that now is work in progress to later leaflet - but it keeps blowing it's stack for some reason... doesn't like popups... so I can't release it in that state. |
|
So if you have a tracks layer for every other type of layer you could end up with 2x the layers ? Digging into the code.. I see I can already set the tracks (and area) options, as they get picked up from the data anyway... so maybe just need more docs ?
|
@dceejay regarding layer, I thought only about a single "tracks" layer containing all tracks of all moving markers...if and only if the user had set it in the node config form (and if users decide push too many layers into a map...) |
@dceejay |
looks FANTASTIC! |
pushed as 1.5.37 |
@dceejay , |
will be easy to add a check in the track node to only update if lat or lon have changed. |
and actually - should also be possible to allow updates to objects by adding to them in-situ... ie be able to send just name plus new parameter without lat lon... by keeping a list of objects and just adding to them as info comes in. Would make changing icons or colours a lot simpler.... maybe. |
Thanks! One other suggestion (I'm using in my implementation), is adding the popup option to other map entities (like area, circle, line) similar to the marker popup handler (defaults to "name").... |
For removing unwanted fields of the marker default info box (where popup option not used), I use an array (including the wanted fields names) a default one replaced by optional injected one, using this default/optional array saving the need to delete each option separately (just before building the "words" variable - for cleaner code, since using the new popup option is encouraged it mostly for wm developers convenience). |
Also consider running HTML validator on index.html (use https://validator.w3.org), I've cleaned some errors using it.... |
The new added "feedback" function (sending map in actions), I suggest to allow other actions than "feedback" and add property (for backwards compatibility, I've added the two as last function parameters The use case: |
Leaflet V1.4 |
yes I have a 1.4 branch (leaflet-upgrade) almost ready to go... just "baking" it for a while to check before releasing it as beta. |
For the new context menu option, while most of the html panel configuration and parameters should be set by server nodes. The only internal "map" parameter is the click position (for markers usually its should be also "known" by the server). Use case: possible bug: in possible bug: in |
HTML - yesy nothing serious for me only hels while debugging front end... |
so function(n,v,(optional a)) would be ok and then send {action:a||"feedback", name:n, value:v} |
PS - I published the v2.0.0-beta to npm which uses leaflet 1.4.x if you wish to try it. |
Sure, thanks! |
Thanks, I'will. |
I added the other grid overlay back now ... it works on leaflet 1.x . Happy for the suggestions in parallel, I'm on a slower path than you :-) |
Thanks! I'm not sure, but isn't leaflet rectangle object type handled by "worldmap"? (only as polygons?)...
my code: (requires adding 'type' attribute = 'rectangle') change to:
BTW - the nice part of externalizing the "popup" is the ability now to inject many additional functionality with almost no code changes (the "editing" option for example was added by adding the js files and setting a popup command button to : |
why are rectangles special ? |
Rectangles: since leaflet draw has two different shapes for rectangles and polygons, maintaining leaflet conventions should be a good reason... Editing a rectangle is different from editing a polygon in all editing tools, also when returning a shape from drawing tool, the type of the shape might be of importance to the user (in my case I use the shape type to allow certain options based on shape type). Editable: I found this extension easier to use for allowing editing to existing "worldmap" injected shapes by use of only a popup button and sending the edited shape to NR by the "feedback" function in the popup html: {{name}} - area/rectangle/circle name Also Editable allows editing for its created shapes...but requires rewriting the NR feedback Anyway - adding a usable drawing tool to "worldmap" should include the ability to edit existing shapes, draw new shapes, save an edited/created shape, cancel currently edited/created activity... I suggest allowing handling a single drawing entity at a time only (so if I'm drawing a new shape I can only cancel or save it - return the data to NR for handling. but allowing creating multiple shapes on the map at the same time, doesn't make a lot of sense) |
Ah right. once again moving to leaflet 1.x has caused a bump in the road. The old drawing layer was editable, so you could re-edit shapes. They have changed the API and now they aren't currently editable. I'll see if I can work it out and restore it as was. That may remove the need for editable... but it did seem to have some nice extra capability - but then the basic tools need to be re-created in that so it's a bit 50/50 at the moment. OK - update - I'm leaning towards replacing Draw with Editable - so fingers crossed we can get best of both. |
This is the code that works for me with Editable for creating new shapes (first proto code...), same look and feel like Draw with small changes (sorry I don't use lines...should be added):
for editing existing shapes I use the following "popup" option (my NR function), use as popup is better usability since the user selects the entity directly on the map w/o the need to access the toolbar:
|
hmm - having gone someway down this path... I found the "old" measure control was broken (as it relied on Draw which I had removed... So I tried that other measure you initially mentioned - only to find it's yet another 76k library, so it would be smaller to leave Draw and the old measure in place, and just add editable for extra editing. This is all somewhat frustrating :-( |
You are correct! |
I have made Draw handle individual edits and added an editPoly function to help make that easier from a popup/contextmenu. |
@dceejay Great Job... , I'd be happy to send you a link and access (pp me). |
Hah ! - well the big jump was to move to leaflet 1.4 which is where you were anyway - so hopefully some of the other addons will be easier / more compatible as we move forward. |
Hi @dceejay |
PR - or example code welcome |
|
Excellent ! Yes I can see that is better - will implement. Thanks as always. |
Suggestion. I use worldmap for survailence/monitoring of services and i would like to be able to play a sound in the browser of the client screen if a object on the map needs attention. |
Hi @dceejay, Thanks for a great work with this node, its outstanding :) I have a question, would it be difficoult to add two options:
What do You think about those options ? |
Hi,
|
Hello, Thank You for the reply :) according to Your answer is there a simple way i can update to leaflet 1.9 ? And try it out even if it will break my library ? thanks also for the info with altitude measurement i will try to figure it out how can i get this measurement to work basing on your info with http get node :) |
Woow that's outstanding work :D EDIT: I've found one solution for altitude measurement and it's free for non comercial use and has a lot of daily requests. |
Nice find. v3 now published |
Hi @dceejay, thanks for this great node!
I added few enhancements into my fork (in dev private branches now), before submitting yet another pull request , please consider it and I'll send pull requests according to your guidance:
The text was updated successfully, but these errors were encountered: