You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @morehawes, awesome work with Waymark Jow! It deserves more stars ⭐️. Quick questions:
Can this feature make a comeback and disabled with a filter instead? You removed it on 1.1.0. Removed Settings for importing custom GeoJSON properties. We are creating a Real Estate map and we need custom properties besides the default ones.
How should we target the callback function to get a property from a marker into an input somewhere in the page? We want to get the properties for selected markers to add them somewhere else as a table.
Is is possible to show a property as the marker icon instead of text/html/icon? Say we want to show a property price, or square meters.
Can this feature make a comeback and disabled with a filter instead? You removed it on 1.1.0. Removed Settings for importing custom GeoJSON properties.
I have to apologise for removing this feature without warning! This was one of a number of smaller settings and features that I removed in order to try and simplify the plugin codebase. This was much needed for future plans!
we need custom properties besides the default ones
This feature stored expected custom properties by simply appending them to the Overlay Description as a HTML <table>, which isn't very helpful if you are looking to do something else with the values. It also only did this once - on import of the original GeoJSON, so this was a pretty crude implementation.
Could you provide more specifics, ideally with an example of what you are trying to achieve? Currently unexpected properties are removed, but I can see that it would be useful to provide a mechanism for storing and accessing expected properties.
How should we target the callback function to get a property from a marker into an input somewhere in the page? We want to get the properties for selected markers to add them somewhere else as a table.
Please check out this example, here the title property is accessed for each Overlay like so:
layer.feature.properties.title
I hope this helps.
Is is possible to show a property as the marker icon instead of text/html/icon? Say we want to show a property price, or square meters.
This sounds quite custom to your project, however if in the future properties are stored and available as outlined above then yes this kind of customisation would be possible.
Are you using this for a commercial project? Would you be willing to sponsor the development of such a feature?
Overlay Properties - Read GeoJSON feature properties when importing (Settings > Overlays > Properties). If Waymark finds data for the specified property keys they will stored upon import. These can be automatically appended to the Overlay Description, or accessed programatically via the layer.feature.properties Object.
Once the expected properties have been imported, they can now be accessed on the front-end like so:
//Our Callback Functionconstwaymark_properties=(Waymark)=>{if(typeofWaymark!=="object"||typeofjQuery!=="function"){console.error("Waymark or jQuery not loaded");}// Iterate over each OverlayWaymark.map_data.eachLayer(function(layer){// When the layer is clickedlayer.on('click',function(e){alert(JSON.stringify(e.target.feature.properties));});});};
Please let me know if this works as expected for you.
Activity
morehawes commentedon Jun 10, 2024
Hi @dariospace,
Thanks for reaching out and for your kind words 🙏
I have to apologise for removing this feature without warning! This was one of a number of smaller settings and features that I removed in order to try and simplify the plugin codebase. This was much needed for future plans!
This feature stored expected custom properties by simply appending them to the Overlay Description as a HTML
<table>, which isn't very helpful if you are looking to do something else with the values. It also only did this once - on import of the original GeoJSON, so this was a pretty crude implementation.Could you provide more specifics, ideally with an example of what you are trying to achieve? Currently unexpected properties are removed, but I can see that it would be useful to provide a mechanism for storing and accessing expected properties.
Please check out this example, here the title property is accessed for each Overlay like so:
I hope this helps.
This sounds quite custom to your project, however if in the future properties are stored and available as outlined above then yes this kind of customisation would be possible.
Are you using this for a commercial project? Would you be willing to sponsor the development of such a feature?
Cheers,
Joe
morehawes commentedon Jun 11, 2024
Thanks for the extra detail :)
Instead of disabling, I think a mechanism for storing and accessing expected properties is a good idea.
I will definitely think more on this.
Cheers,
Joe
morehawes commentedon Jun 11, 2024
Good point, looks of room for improvement here! This might be worth a new issue/discussion to gather ideas for actions/filters.
v1.3.0 - Overlay Properties
morehawes commentedon Jun 13, 2024
Hi @dariospace,
I have just released v1.3.0 of the plugin:
Once the expected properties have been imported, they can now be accessed on the front-end like so:
Please let me know if this works as expected for you.
Cheers,
Joe