OpenGIS / Waymark

Waymark adds powerful mapping features to WordPress that are easy to use. Create beautiful, interactive Maps that you can customise to suit your needs.
https://www.waymark.dev
GNU General Public License v2.0
21 stars 6 forks source link

Discussion #28

Closed phrizm closed 9 months ago

phrizm commented 9 months ago

Hello!

I have tried several maps plugins and really appreciate your work, it's free and really complete map solution with great logic behind.

I have tried to understand plugin's logic in order to develop my custom solution because I wanna add more personal case options. One little example: once kml is converted to geojson on the map I need all my markers list in another metabox for using observer HQ assigning marker position on the map clicking a link word or javascript reach logic. Anyway.. It's just one of my little custom ideas and don't want to open suggestions for your plugin since it doesn't fit everyone's needs.

I'm not competing with your great plug btw 😂. So let's dive with request and help with your great experience.

I made my plugin now separating front and back for further adjustments. It's finally saves view and kml on the map passing saved view to the front end by shortcode.

Its pretty buggy since it's freezes a lot my Dom and overlapping my existing content (tailwind and alpine theme) maybe I have to adjust output.

But.. Now I'm kindly ask you to give it a quick look, it's pretty simple and give me some advice on performance and passing my backend adjustments to the front end logic.

Really appreciate your help.

phrizm commented 9 months ago

Mapster.zip

And the final result is here:

https://www.moonorb.it/2023/06/25/oman-and-emirates/

Thank you so much for your opinion and suggestions.

morehawes commented 9 months ago

Hi @phrizm,

Thanks for reaching out with this! I took a look through the code and it looks like a really good start! :) Unfortunately though after successfully reading my KML I get this console error on clicking "Publish":

Uncaught SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 79929 of the JSON data
    parse jQuery
    <anonymous> http://joe-dev.local/wordpress/wp-content/plugins/Mapster/back/js/mapster-back.js?ver=6.4.3-alpha-57182:29
    EventListener.handleEvent* http://joe-dev.local/wordpress/wp-content/plugins/Mapster/back/js/mapster-back.js?ver=6.4.3-alpha-57182:4

I'm curious what you are hoping to achieve with your plugin, is there a particular use-case/feature-set/design/goal you have in mind?

Are you planning on making this open source? If so I definitely recommending hosting it somewhere like GitHub :) I would be happy to make some PRs if I think there is something I can help with.

Back to Waymark though...

I have put together an Example which uses the Callback Function to add an interactive Overlay list below the Map.

I have been meaning to add something like this to Waymark for a long time, but as the plugin gets bigger/more complex(/MESSIER!) I am hesitant to add new features, but the Callback Function can be quiet powerful :)

It sounds like this might be something close to what you are trying to achieve, so I hope you find it useful.

phrizm commented 9 months ago

Thank you so much for your kind reply and your time.

I seen your terra side project and it's seems fascinating!

Great stuff.

It's sad that you cannot visualize kml properly loaded. Strange for me. But this plugin is made for 80% with chatgpt (shame on me).

Now I will render this as open source project and I have many fancy ideas on how maps could be rendered. It's not so hard make a cpt. It's hard to render it into front with all stuff without being laggy. I just can't immagine how much time you spent on this project. Really appreciated.

Now: have you seen my example of front end map passed?

I would like to discuss with you further implementation of some crazy js logic in order to pass in in the front end. Great friend of mine (yo Karim) gonna join us once he got some time from his full time work, I'm pretty sure. He is not a cpt lover but he has a big point tomake a plugin working on Gutenberg side. I personally rendered 100 different maps in the front end Gutenberg without any single lag.

So.. The road is widely opened here And I would like to discuss some methods with you ofc.

Ty.

morehawes commented 9 months ago

So.. The road is widely opened here

Good luck to you! Be sure to post a link to the project here once it's up :)