mastervanleeuwen / J-TrackGallery

GPS Track Gallery component for Joomla
https://mastervanleeuwen.github.io/J-TrackGallery/
6 stars 0 forks source link

Map integration with DPCalendar Locations #2

Closed joomleb closed 2 years ago

joomleb commented 3 years ago

Hi guys, with jTracks Gallery we can show all Sport gps tracks like "Bicycle", "Mountain Bikes", "Trails", "Pedestrian" etc.

We'd like to show on the same Map all the Sport Locations like Swimming pools, Stadiums, Racetracks, Gyms etc. we have saved into our DPCalendar as "Locations", here the demo site. The Location "Color" could be used to select the Locations we want to show into the Map ("color" field is used to classifying the Locations) and/or the standard Joomla Tags...

In this way J-Track Gallery Map could be a "Sports" Map where are shown all Sport Locations/Tracks

PS - i don't mean to "merge the map view from DPCalendar and the map", but "to show on JTrackGallery Map some markers based on DPCalendar Locations datas into the Joomla DB" Do you need a DPCalendar extension zip file ? Do you need a live Joomla + DPCalendar test site where to work online ?

Many Thanks for your attention...

mastervanleeuwen commented 3 years ago

Hi Joomleb,

I had a quick look at the DPCalendar code and I think that using information from DPCalendar will be a bit of a hack. It would probably be relatively easy to read all events that have a location specified from the database and then display them. Adding a date selection, e.g. that the events should be in the future is also possible, but something more advanced gets complicated quickly. What exactly do you have in mind?

Do you already have a website where you are planning to add this functionality? Does it have a lot of locations in the DPCalendar?

Cheers, Marco.

joomleb commented 3 years ago

@mastervanleeuwen Hi Marco, what I have in mind is really more simple, I do not mean to show the Events, but just the Locations (stored into the dpcalendar_locations) and to be able to show just the ones with a specified "Tag" and / or "Colour"

Here you can see the live site page of "Locations Map", as you can see right now there are 5 locations stored as example. I think that when the site will be completed the Locations to show on your map could be something like between 100 and 500 markers...

If it can be useful I can put online a Test copy site...

mastervanleeuwen commented 3 years ago

Hi Joomleb,

I implemented a first version of the code to display DPCalendar locations in J!TrackGallery. You can find a test version of the component here: https://github.com/mastervanleeuwen/J-TrackGallery/archive/refs/tags/0.90.32-rc2.zip

If you install this version, and go to 'System -> Global Configuration' in the administrator view, there is an entry for J!Track Gallery, where there is the option to show DPCalendar location in the overview map.

If you are still interested in this feature, please go ahead and give it a try and let me know if it works for you. If it works, I can try to add features like selection categories etc.

I am also interested to try and provide the option to use Google Photos, but this is a bigger project and I still have a few other smaller additions that I plan to make before working on this.

Best regards, Marco.

joomleb commented 3 years ago

Hi Marco, many thanks for the update! Sure, I'm going to install it on a test site and I'll be back here really soon...

joomleb commented 3 years ago

Okay, so,

When I click on it I have back an Error 0 page - Call to a member function getName() on bool

Sure I'm missing something... I sent you by email (the gmail) a full Super User access to the test site, so you can check if all is right...

mastervanleeuwen commented 3 years ago

Oeps, it turns out that I forgot to commit one file (I was working on some other changes in parallel and lost track). This should be fixed now; the file at this link: https://github.com/mastervanleeuwen/J-TrackGallery/archive/refs/tags/0.9.32-rc2.zip has been updated.

joomleb commented 3 years ago

Hi Marco, thanks! Tested and it seems to work as expected. I'm going to add here in GitHub some issues I am finding...

Here I just add, being a concept of the integration, that:

A - It should grab into Map only the DPCalendar > Locations with Status "enabled", while right now it is grabbing all them, enabled and disabled Locations

B - DPCalendar use Tags (Joomla Tags) as Locations categorization. So, sure is a must to have a Tags to show setting "DPCalendar > Locations > Publishing > Tags", just below the J-TrackGallery Category field into the:

C - Would be good to use also its "DPCalendar > Locations > Content > Colour", the color used to colorize the Icon Map Location Marker...

To solve the B and C and have also a full integration with all the J-Track Search tools, Why not add the DPCalendar integration at the Category level ? I mean, instead to have a generic "Menu Default Settings > Show DPCalendar locations in overview map: Yes/No", to manually create a new (one or more) jTrack Category where I will be able:

More Simple and full integrated, What do you think ?

mastervanleeuwen commented 3 years ago

Hi Joomleb,

Thanks for the suggestions. I have added a filter that selects only published locations (this was an oversight in the first try) and the location colors are now also used.

This is the new version: https://github.com/mastervanleeuwen/J-TrackGallery/archive/refs/tags/0.9.32-rc4.zip

Using a selection based on tags is a bit more complicated, it stays on the wish list for now. I also like the suggestion of using categories in the way that you suggest, but also that is a rather deep change, so I have to think a bit about how/whether to do that. Maybe is is even possible to use the Joomla tag system instead of (or in addition to) the J!TrackGallery categories for tracks as well.

joomleb commented 3 years ago

Hi Marco, thanks! Downloaded, Installed and Tested. Something is not going as expected, the map is not shown anymore (I cleared the Joomla Cache), you can check on my Test3 site, this is the Overview Map page.

About the "...I have to think a bit about how/whether to do that..." = I have some BIG suggestions for you that I''d like to discuss with you. I'm not sure here in GitHub is the right site to do it. Please, Can I send to you an email to the gmail you are using here in GitHub perfil ?

mastervanleeuwen commented 3 years ago

Dear Joomleb,

It seems to work for me:

image

Maybe you need to reload also the local cache in your browser?

You can also contact me directly via gmail, although I am not sure why that would help.

Best regards, Marco.

joomleb commented 3 years ago

Hi Marco, you are right, it was the Browser Cache, it is running.

DPCalendar integration: DPCalendar use Tags (Joomla Tags) as Locations categorization. So, sure is a must to have a DPCalendar > Locations > Tags setting when creating an Overview Map menu item.

Anyway, in first of all, I'm going to prepare the email for you (thanks for your confirm)

joomleb commented 3 years ago

Anyway, in first of all, I'm going to prepare the email for you (thanks for your confirm)

Hi Marco, I sent it on 6th July, Please, Can you confirm receipt? I have several issues to report here, but I was waiting for your reply first to do it in an ordered way... Thanks!

mastervanleeuwen commented 2 years ago

This has been implemented, in a minimal way for now. Some more seamless integrations may be possible with Joomla 4; I will keep an eye out for those options.