Skip to content
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

add location to posts in feed #14

Open
1 of 2 tasks
GWPvGWP opened this issue Dec 5, 2024 · 2 comments
Open
1 of 2 tasks

add location to posts in feed #14

GWPvGWP opened this issue Dec 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@GWPvGWP
Copy link

GWPvGWP commented Dec 5, 2024

Implement location when shared by user

  • add location above posts in feed
  • link to coordinates on map (e.g. Google Maps)

Future idea (extra feature): user map with posted user locations of the day
Don't know if there are ready-to-use packages or api's for that, otherwise it should be built with Leaflet or OpenLayers maybe.

@GWPvGWP
Copy link
Author

GWPvGWP commented Dec 5, 2024

Example for posted location map as one could do in html (thanks to AI for the fast example)

<html>
<head>
    <title>Leaflet Map</title>
    <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
    <style>
        #map { height: 600px; }
    </style>
</head>
<body>
    <div id="map"></div>
    <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
    <script>
        // Initialize the map
        var map = L.map('map').setView([0, 0], 2); // Set initial view

        // Add a tile layer
        L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
            maxZoom: 19,
        }).addTo(map);

        // List of example coordinates (should be fetched from feed)
        var coordinates = [
            [51.505, -0.09],
            [48.8566, 2.3522],
            [40.7128, -74.0060]
        ];

        // Add markers for each coordinate
        coordinates.forEach(function(coord) {
            L.marker(coord).addTo(map);
        });
    </script>
</body>
</html>

I'm better with maps than in coding :)

@Vexcited
Copy link
Owner

By the way the location above the posts is now implemented (very badly) but as a PoC, it works !

I updated the tasks in your issue to reflect the progress.

@Vexcited Vexcited changed the title add location (enhancement) add location to posts in feed Dec 30, 2024
@Vexcited Vexcited added the enhancement New feature or request label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants