Giter Site home page Giter Site logo

nextcloud / maps Goto Github PK

View Code? Open in Web Editor NEW
477.0 20.0 85.0 43.44 MB

🌍🌏🌎 The whole world fits inside your cloud!

Home Page: https://apps.nextcloud.com/apps/maps

License: GNU Affero General Public License v3.0

PHP 28.94% CSS 0.01% JavaScript 51.03% Makefile 0.33% Vue 18.70% Hack 0.04% SCSS 0.95%
nextcloud nextcloud-app maps map routing osrm mapbox graphhopper tracking gps

maps's Introduction

Nextcloud Maps

With MapLibre-GL support

🌍🌏🌎 The whole world fits inside your cloud!

  • πŸ—Ί Beautiful map: Using OpenStreetMap and Leaflet, you can choose between standard map, satellite, topographical, dark mode or even watercolor! 🎨
  • ⭐ Favorites: Save your favorite places, privately! Sync with GNOME Maps and mobile apps is planned.
  • 🧭 Routing: Possible using either OSRM, GraphHopper or Mapbox.
  • πŸ–Ό Photos on the map: No more boring slideshows, just show directly where you were!
  • πŸ™‹ Contacts on the map: See where your friends live and plan your next visit.
  • πŸ“± Devices: Lost your phone? Check the map!
  • γ€° Tracks: Load GPS tracks or past trips. Recording with PhoneTrack or OwnTracks is planned.

Future plans:

User Documentation

My Maps

Custom maps are stored by default in the "/Maps" folder. This folder can be found in the files app. Other folders turned into map by placing a ".index.maps" file into it. Content can therefore be added via:

  • Webdav (Desktop and Mobile clients)
  • Files app
  • Maps app

Custom maps can then be shared from the maps or any other app.

Sharing map

Maps can be shared using the nextcloud sharing system.

Favorites on custom map

Favorites on custom the custom maps are stored in the .favorites.json file.

Shared favorite categories can be linked to a custom map. Linked favorite categories are read-only. They can be edited on the owners default map. These links are stored in the ".favorite_shares.json".

Contacts on custom map

Contacts on custom maps are stored as vCards (*.vfc) files.

Tracks on custom map

Tracks on custom map are stored as "*.gpx files".

Photos on custom map

Photos are stored in the corresponding folder. They can be added from files or from maps Existing photo albums can be viewed on the map by placing a ".index.maps" file into it.

Scanning photos take time. Therefore photos are scanned in the background. After adding photos it might take a while, until the scan is done and the photos are shown on the map.

πŸ— Development setup

This requires that you install node and npm.

  1. ☁ Clone this app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/maps.git
  2. πŸ‘©β€πŸ’» In the folder of the app, run the command make to install dependencies and build the Javascript.
  3. βœ… Enable the app through the app management of your Nextcloud
  4. πŸŽ‰ Partytime! Help fix some issues and review pull requests πŸ‘

Admin documentation

Media scans are performed with the regular system background job.

Scans can also be manually triggered via occ command:

./occ maps:scan-photos to rescan photos' GPS exif data

./occ maps:scan-tracks to rescan track files

maps's People

Contributors

adripo avatar alaskanpuffin avatar batpio avatar benstonezhang avatar brantje avatar deepdiver1975 avatar dependabot-preview[bot] avatar dependabot[bot] avatar djaeger avatar gary-kim avatar henni avatar jancborchardt avatar kovge avatar morrisjobke avatar nextcloud-bot avatar paulschwoerer avatar rakekniven avatar robinfrcd avatar rullzer avatar simonspa avatar skjnldsv avatar szaimen avatar tacruc avatar thomas-mc-work avatar umgfoin avatar v1r0x avatar valdnet avatar vincowl avatar wronny avatar zukaitis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maps's Issues

Display Contacts on Maps

Planing of showing contacts on the map.

ToDo:

  • Caching Table for addresses to Cordinates (Address string), Lat, Lng, timelookedup
  • When to look up the results, We should query less then one time per second, so one demand is not possible => should be done in the backend in advanced, to not hit the one request per second limitation
  • Extend the navigation to show "suggestions for contacts"
  • Api call for contactSuggestions
  • phrase coordinat form vCard in backend and frontend
  • make contact preview nice
  • Delete Geo attribute from vCard
  • Set geo attibute according to vCard version, in vCard v4 it should be an geo url.
  • Check permission when setting Geo Attribute

Possible interesting vCard Attibutes

  • ADR
    • Can be multiple, I guess all are interesting
  • GEO
    • Different formates in v2,3 and v4

Problems

  • it's currently possible to place a contact (edit its coordinates) even if it's from an address book shared with me with readonly permissions.

Share favorite locations

My understanding is that currently the only way to share static locations stored in a user's "favorites" is by exporting them to a GPX-formatted file, either exporting all favorites or favorites in a selected category. This GPX file may then be shared in the standard ways file sharing is supported in Nextcloud.

It would be very useful to have the ability to share a favorite group "directly" with either (1) Nextcloud account holders (the same way files can be shared with access control based on authenticated Nextcloud accounts) or (2) via public link, where the practically-impossible-to-guess shared link opens the Maps app in a public view-only mode that displays the shared favorites group on the map. In the case of shares with local Nextcloud account holders, the shared favorites would appear alongside the user's own favorites, perhaps under a collapsible/toggleable "Locations shared with you" navigation section.

Provide JSON API for search

(Reopening your issue here because we moved development @stefan-niedermann :)

There should be an API for searching for addresses.
Otherwise every client would have to implement searching in contacts etc. itself. Providing an API would save every client much work.

This should be read as "WiP", just brainstorming.

Request

GET /search?q=<string>

Response

Nextcloud Maps should search all reachable information in the Nextcloud (especially from Nextcloud Contacts, but maybe from Nextcloud Calendar - Meetings in the near future?). And it should search osm via nominatim to get PoIs.
Mimetype: application/json

{
  /* Contacts from contacts app */
  contacts : [
	  {
		firstname : <string>,
		lastname : <string>,
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
		lat : <int>,
		long : <int>
	  },
	  ...
  ],
  /* Points of Interest (bars, clubs, toilets, buildings, ...) */
  poi : [
      {
        title : <string>,
        type : <string>, /* Enum? */
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
        lat : <int>,
        long : <int>
      },
      ...
  ],
  /* Addresses from OSM search */
  addresses : [
    {
      /* Whatever the OSM JSON-API delivers ;-) */
    },
    ...
  ]
}

Provide APIs to sync with gnome-maps

This is part of the ongoing discussion to revive the work in nextcloud maps. I will be proposing a project to sync gnome-maps with nextcloud. Current requirements from the gnome-maps side are
1)Favorites:
This is the most important feature which is required. Having access to your favorite places
where ever you go, is very useful.
Favorites are just one of many possible categories we can have, so API should allow for passing of places in any category. This is very simple to do since we can just have an attribute which stores type of place.
I am still shaping and understanding the proposal so I'll appreciate any ideas and suggestions.

releases

Hi, it would be nice, if app was released at least on github. Thanks

Color of contact groups is non-standard, not reflected anywhere on map

Just saw this coloring of the Contact groups in the navigation:
contact group coloring is not reflected and maybe not useful

Some issues here:

  • This is not used anywhere else, like in the Contacts app
  • It’s not reflected anywhere on the map, at least as far as I can see
  • We already use color for favorites, and that is already enough

I would say we remove the individual coloring of groups? What do you think @nextcloud/maps

Error during make command on rework branch

@v1r0x trying to build the rework branch, this happens:

jan@Rechenknecht:~/nextcloud/apps/maps$ make
make npm
make[1]: Entering directory '/home/jan/nextcloud/apps/maps'
npm run build

> [email protected] prebuild /home/jan/nextcloud/apps/maps
> npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update

npm WARN deprecated [email protected]: ..psst! While Bower is maintained, we recommend Yarn and Webpack for *new* front-end projects! Yarn's advantage is security and reliability, and Webpack's is support for both CommonJS and AMD projects. Currently there's no migration path, but please help to create it: https://github.com/bower/bower/issues/2467
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[email protected] /home/jan/nextcloud/apps/maps
β”œβ”€β”€ [email protected] 
β”œβ”€β”€ UNMET PEER DEPENDENCY country-language@^0.1.7
β”œβ”€β”¬ [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚ β”‚   └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚   └─┬ [email protected] 
β”‚ β”‚ β”‚     β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚     β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚     β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚     β”‚   └── [email protected] 
β”‚ β”‚ β”‚     └── [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚   β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   β”‚   └─┬ [email protected] 
β”‚ β”‚ β”‚   β”‚     └── [email protected] 
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚   └─┬ [email protected] 
β”‚ β”‚ β”‚     └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚   └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ └─┬ [email protected] 
β”‚   β”œβ”€β”€ [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”‚ └── [email protected] 
β”‚   β”‚ β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”‚ └── [email protected] 
β”‚   β”‚ β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”‚ └─┬ [email protected] 
β”‚   β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚   β”‚ β”‚   └── [email protected] 
β”‚   β”‚ β”œβ”€β”€ [email protected] 
β”‚   β”‚ β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”‚ └── [email protected] 
β”‚   β”‚ └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └─┬ [email protected] 
β”‚   β”‚   └─┬ [email protected] 
β”‚   β”‚     β”œβ”€β”¬ [email protected] 
β”‚   β”‚     β”‚ β”œβ”€β”€ [email protected] 
β”‚   β”‚     β”‚ └── [email protected] 
β”‚   β”‚     β”œβ”€β”€ [email protected] 
β”‚   β”‚     └─┬ [email protected] 
β”‚   β”‚       β”œβ”€β”€ [email protected] 
β”‚   β”‚       └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”œβ”€β”€ [email protected] 
β”‚   β”‚ └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └─┬ [email protected] 
β”‚   β”‚   β”œβ”€β”€ [email protected] 
β”‚   β”‚   └── [email protected] 
β”‚   └─┬ [email protected] 
β”‚     └── [email protected] 
β”œβ”€β”¬ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚   └── [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ β”‚ └── [email protected] 
β”‚ β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
β”‚ β”‚ β”‚   └── [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ └─┬ [email protected] 
β”‚ β”‚   β”œβ”€β”¬ [email protected] 
β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚   β”‚ └── [email protected] 
β”‚ β”‚   └── [email protected] 
β”‚ β”œβ”€β”¬ [email protected] 
β”‚ β”‚ β”œβ”€β”€ [email protected] 
β”‚ β”‚ └── [email protected] 
β”‚ └─┬ [email protected] 
β”‚   β”œβ”€β”€ [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └── [email protected] 
β”‚   β”œβ”€β”€ [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ └─┬ [email protected] 
β”‚   β”‚   └── [email protected] 
β”‚   β”œβ”€β”¬ [email protected] 
β”‚   β”‚ β”œβ”€β”€ [email protected] 
β”‚   β”‚ └─┬ [email protected] 
β”‚   β”‚   └── [email protected] 
β”‚   β”œβ”€β”€ [email protected] 
β”‚   └── [email protected] 
β”œβ”€β”€ UNMET PEER DEPENDENCY i18next-client@^1.11.1
β”œβ”€β”€ [email protected] 
β”œβ”€β”€ UNMET PEER DEPENDENCY moment@^2.10.6
└─┬ [email protected] 
  β”œβ”€β”€ [email protected] 
  └─┬ [email protected] 
    β”œβ”€β”€ [email protected] 
    β”œβ”€β”€ [email protected] 
    └─┬ [email protected] 
      β”œβ”€β”€ [email protected] 
      β”œβ”€β”¬ [email protected] 
      β”‚ β”œβ”€β”¬ [email protected] 
      β”‚ β”‚ β”œβ”€β”¬ [email protected] 
      β”‚ β”‚ β”‚ └── [email protected] 
      β”‚ β”‚ └── [email protected] 
      β”‚ β”œβ”€β”€ [email protected] 
      β”‚ └── [email protected] 
      └── [email protected] 

npm WARN [email protected] requires a peer of i18next-client@^1.11.1 but none was installed.
npm WARN [email protected] requires a peer of moment@^2.10.6 but none was installed.
npm WARN [email protected] requires a peer of country-language@^0.1.7 but none was installed.

> [email protected] build /home/jan/nextcloud/apps/maps
> node node_modules/gulp-cli/bin/gulp.js

[18:22:51] No gulpfile found

npm ERR! Linux 4.10.0-32-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.7.2
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `node node_modules/gulp-cli/bin/gulp.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script 'node node_modules/gulp-cli/bin/gulp.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the maps package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/gulp-cli/bin/gulp.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs maps
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls maps
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/jan/nextcloud/apps/maps/npm-debug.log
Makefile:90: recipe for target 'npm' failed
make[1]: *** [npm] Error 1
make[1]: Leaving directory '/home/jan/nextcloud/apps/maps'
Makefile:62: recipe for target 'build' failed
make: *** [build] Error 2

Can you help? :)

Discussion about favorites and photos

Hey @jancborchardt, @tacruc, @Sumaid,

I forked the rework branch and worked (in rework-again branch) on favorite API and UI. I also made a few modifications to photo management that was already quite ready. I feel favorite and photo management are functional and can be tested. I'm interested in your opinions.

This is also a memo 😁.

About the map itself:

  • bottom right corner: tile layers management. 2 buttons for main providers and a classic Leaflet selector for extra providers.
  • top right corner: locate control switch
  • top left corner: search (untouched), scale control, zoom control
  • map "state" is saved and restored (selected tile layer, locate control state, photos/favorites/categories layers state).

About both photos and favorites

  • favorites and photos markers are displayed with MarkerCluster
  • click on a cluster: spiderfy instead of default action (zooming)
  • photos, favorites and favorite categories layers can be toggled with the eye icon in the sidebar
  • Leaflet.FeatureGroup.SubGroup is used for category layers to be able to easily add/remove them to the markerCluster layer.

About photos :

  • mouseover on a photo: display a tooltip with a large preview
  • click on a photo: open the Gallery app in a new tab

About favorites:

  • sidebar category list is updated dynamically when favorites are added/edited
  • automatic category color depending on its name
  • click on category name: zoom to layer bounds
  • click on favorite marker: show popup in which you can edit/delete/move the favorite
  • rename category: edit all markers of the category
  • foldable category list (independent from layers toggling)

TODO:

  • import/export favorites from/in a gpx file (OsmAnd-like?)
  • see photos shared with me (scan is ok but photos are not added to DB when a file is shared)

The app can be installed in NC 15 or 16:

git clone https://github.com/nextcloud/maps -b rework-again /PATH/TO/NEXTCLOUD/apps/maps
cd /PATH/TO/NEXTCLOUD/apps/maps
make

It probably required to execute occ maps:scan-photos command after installing the app to make it include existing photos.

Feel free to include anyone in the discussion.

GPX file import is broken

When I try to import GPX files (from the Files app), I receive a Track /path/to/track.gpx was not found notification. There are no errors in the data/nextcloud.log file.

When I revert to commit 3e3d461 I can import GPX files, but when I checkout 3e3d461 it is broken. Somewhere between 08/09 and 08/16 it looks like the GPX file import broke.

Originally posted by @anaqreon in #76 (comment)

Unknown column 'date_created'

After enabling the app on my bigger server (20 users) 1.5 TB of pictures I found the following error in the log:

[index] Error: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT `id`, `name`, `date_created`, `date_modified`, `lat`, `lng`, `category`, `comment`, `extensions` FROM `oc_maps_favorites` `f` WHERE `user_id` = ?' with params ["arne"]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_created' in 'field list' at <<closure>>

 0. /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... '", Doctrine\DBAL\Dr ... ]})
 1. /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... '")
 2. /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 911
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT `id`, `n ... ?", {1: "arne"})
 3. /srv/www/nextcloud/lib/private/DB/Connection.php line 195
    Doctrine\DBAL\Connection->executeQuery("SELECT `id`, `n ... ?", ["arne"], [2], null)
 4. /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 200
    OC\DB\Connection->executeQuery("SELECT `id`, `n ... 1", {dcValue1: "arne"}, {dcValue1: 2})
 5. /srv/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /srv/www/nextcloud/apps/maps/lib/Service/FavoritesService.php line 67
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /srv/www/nextcloud/apps/maps/lib/Controller/FavoritesController.php line 88
    OCA\Maps\Service\FavoritesService->getFavoritesFromDB("arne")
 8. /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Maps\Controller\FavoritesController->getFavorites()
 9. /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Maps\Control ... {}, "getFavorites")
10. /srv/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Maps\Control ... {}, "getFavorites")
11. /srv/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("FavoritesController", "getFavorites", OC\AppFramework\ ... {}, {_route: "maps.favorites.getFavorites"})
12. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "maps.favorites.getFavorites"})
13. /srv/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "maps.favorites.getFavorites"})
14. /srv/www/nextcloud/lib/base.php line 1000
    OC\Route\Router->match("/apps/maps/favorites")
15. /srv/www/nextcloud/index.php line 42
    OC::handleRequest()

GET /apps/maps/favorites
from 138.232.236.7 by arne at 2019-08-29T16:36:11+02:00

Offset -1 not within [0, 731422]

Hi,
I'm testing this first release, and it seems awesome for now ! Good job to you !

Of course there are still some bugs, and this one that occurs on some of my files

[lsolesen\pel\PelDataWindowOffsetException]
Offset -1 not within [0, 731422]

The higher value change depending on the file, it seems to append on some old files (all jpg), but I have no error on them in the Viewer, so they don't seem corrupt either.

Furthermore, the scan crash on those error, and maybe having a warning + skip the file might be a better behaviour, since this interrupt the scan for all user, despite a lot of valid file which could be displayed.

Thanks again,
cheers

Allow storage of maps offline

Hello,

to avoid a problem like with the last provider cutting access suddenly, it would be great to store maps offline to be independent of outside changes. It would also follow the philosophy of Nextcloud itself, meaning to host everything by oneself without dependence on some cloud service.

To save space it would be nice to be able to download only maps of certain countries/continents. If additional maps should be installed, they could be downloaded in the web interface/placed manually.

Different Idea for update slider range

@eneiluj : this is how I takled the same problem

 updateSliderRangeFromController: function() {
        // favorites
        var mins = [
            favoritesController.firstDate || Date.now()/1000,
            photosController.photoMarkersOldest || Date.now()/1000,
            contactsController.contactMarkersOldest || Date.now()/1000
        ];
        var maxs = [
            favoritesController.lastDate || 0,
            photosController.photoMarkersNewest || 0,
            contactsController.contactMarkersNewest || 0
        ];
        
        this.min = Math.min(...mins)
        this.max = Math.max(...mins)

        if (this.min === this.max {
            this.min = this.min - 10;
            this.max = this.max + 10;
        }
        this.updateSliderRange(this.min, this.max);
        
    },`

Geophotoservice Line:55 Element can be false.

Technical details


    Remote Address: ::1
    Request ID: HBdb0c8Y6SDOEIXVCcD7
    Type: Error
    Code: 0
    Message: Call to a member function getPath() on bool
    File: /srv/www/htdocs/server/apps/maps/lib/Service/GeophotoService.php
    Line: 55
Trace

#0 /srv/www/htdocs/server/apps/maps/lib/Controller/PhotosController.php(40): OCA\Maps\Service\GeophotoService->getAllFromDB('admin')
#1 /srv/www/htdocs/server/lib/private/AppFramework/Http/Dispatcher.php(166): OCA\Maps\Controller\PhotosController->getPhotosFromDb()
#2 /srv/www/htdocs/server/lib/private/AppFramework/Http/Dispatcher.php(99): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Maps\Controller\PhotosController), 'getPhotosFromDb')
#3 /srv/www/htdocs/server/lib/private/AppFramework/App.php(126): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Maps\Controller\PhotosController), 'getPhotosFromDb')
#4 /srv/www/htdocs/server/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OCA\\Maps\\Contro...', 'getPhotosFromDb', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#5 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#6 /srv/www/htdocs/server/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#7 /srv/www/htdocs/server/lib/base.php(975): OC\Route\Router->match('/apps/maps/phot...')
#8 /srv/www/htdocs/server/index.php(42): OC::handleRequest()
#9 {main}

How to regenerate oc_maps table

Hi
After a first installation of nextcloud/maps i made a - maps:scan-photos - with a big network folder shared to all users. The result was a very big confusion :-D

Then i thought to try to uninstall and reinstall to have a 'vanilla' maps environment that not have the big data generated by scanning a big network folder for all users, but it seems the db structure was the same before the reinstallation.

So i decide to try to delete all oc_maps* postgres tables (and oc_appdata mas records), thinking that the reinstall process will recreate, but now the installation process don't recreate missing tables.

So i am asking here how to regenerate oc_maps table or what i have to delete for forcing recreation of the db app environment ?

Thanks

Undefined index: FN

Second error:
Undefined index: FN at /srv/www/nextcloud/apps/maps/lib/Controlle/ContactsController.php#101

Import Google Takeout Saved places

It would be nice to have an option to import from Google Saved places (csv) and Google Maps Starred places (json) files that you get from Google Takeout.

exif_read_data is making problems

On most of my jpegs php read exif is throwing errors. This is giving me a hard time to get 1000 picture in my test installation to do some performance testing.

exif_read_data(P1050526.JPG): Process tag(x013B=Artist ): Illegal components(0) at /srv/www/htdocs/server/lib/private/legacy/image.php#418

I didn't manage to make it more stable, but the metadata app is reading them correctly.
Some sample picture:
P1010498

Events + Contacts + ...!

Once you manage to have contacts on the map (#16) and events on the map (#3), it would be useful how to help the user to understand what is near to who.

Scenarios:
It would be cool if the map (or generally Nextcloud) shows/remembers me that :

  • two clients are near the conference venue (I can call and see if they want me to come and update them on the new features)
  • John lives near the restaurant where I will have a dinner (we can invite him!)

Nice additions would be:

Considering the time frame:
I am scheduling a meeting with a client at their site. I want to see on the map the other meeting which is half an hour before. If it is too far I will have to reschedule this meeting!

Considering the data of other users:
You know that famous conference you are going to attend? Did you know that Karl, the sales rep, is going too? Maybe you can have dinner together (or go together to the client). There are of course permission issues but also a lot of useful applications!

Howto import GPX in rework Branch

Hi,
I'm missing some Documentation :(
Is it possible to import a .gpx File when using the rework Branch, and if yes, how to do this?
Thanks for work, this App is really nice! :)

Refresh should not cause the map to reset to your position

Rather than always resetting to your position, the Maps app should save the bounding box you last saw and show that again.

When you want to change to your position, there’s already a button for it.

cc @DJaeger cause we moved repositories and will continue work here. :)

Favorites import/export from GPX is broken

After commit c2b9c31 it appears that the import/export favorites using GPX files is broken. The errors I get are like the one pasted below, where it looks like there is a missing endswith() function, which was last modified in commit e88ce73, based on a search of the git log.

{
	"reqId": "Hk11oXsenZG0sR9BxlRs",
	"level": 3,
	"time": "2019-08-26T09:34:14+00:00",
	"remoteAddr": "1.2.3.4",
	"user": "andrew.manning",
	"app": "index",
	"method": "POST",
	"url": "/apps/maps/import/favorites",
	"message": {
		"Exception": "Error",
		"Message": "Call to undefined function OCA\\Maps\\Service\\endswith()",
		"Code": 0,
		"Trace": [
			{
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 166,
				"function": "importFavorites",
				"class": "OCA\\Maps\\Controller\\FavoritesController",
				"type": "->",
				"args": [
					"/Maps/2019-08-25 21_04_05 (-04_00) filtered-favorites.gpx"
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 99,
				"function": "executeController",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					{
						"__class__": "OCA\\Maps\\Controller\\FavoritesController"
					},
					"importFavorites"
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/App.php",
				"line": 126,
				"function": "dispatch",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					{
						"__class__": "OCA\\Maps\\Controller\\FavoritesController"
					},
					"importFavorites"
				]
			},
			{
				"file": "/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php",
				"line": 47,
				"function": "main",
				"class": "OC\\AppFramework\\App",
				"type": "::",
				"args": [
					"FavoritesController",
					"importFavorites",
					{
						"__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
					},
					{
						"_route": "maps.favorites.importFavorites"
					}
				]
			},
			{
				"function": "__invoke",
				"class": "OC\\AppFramework\\Routing\\RouteActionHandler",
				"type": "->",
				"args": [
					{
						"_route": "maps.favorites.importFavorites"
					}
				]
			},
			{
				"file": "/var/www/html/lib/private/Route/Router.php",
				"line": 297,
				"function": "call_user_func",
				"args": [
					{
						"__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
					},
					{
						"_route": "maps.favorites.importFavorites"
					}
				]
			},
			{
				"file": "/var/www/html/lib/base.php",
				"line": 975,
				"function": "match",
				"class": "OC\\Route\\Router",
				"type": "->",
				"args": [
					"/apps/maps/import/favorites"
				]
			},
			{
				"file": "/var/www/html/index.php",
				"line": 42,
				"function": "handleRequest",
				"class": "OC",
				"type": "::",
				"args": []
			}
		],
		"File": "/var/www/html/apps/maps/lib/Controller/FavoritesController.php",
		"Line": 232,
		"CustomMessage": "--"
	},
	"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0",
	"version": "16.0.1.1"
}

Cleanup Javascript

(Reopening your issue here @Henni cc @v1r0x :)

script.js currently has more than 1800 lines and most of the comments are code comments.

It should be cleaned up by:

  • removing all code comments (we don't need them, thats what git is good for)
  • adding real comments
    • every function should have its own documentation block-comment to explain what it does
    • skim the code for cryptic code segments and add line comments

Cannot enable app in Nextcloud 12

This might be a noob question and probably is easy to solve but since I don't find any more information in the README nor on Google I post here:

I cloned the repo to nextcloud/apps and then tried to enable it in Nextcloud but the "enable" button is inactive. What is the matter here?

Nextcloud Version is 12
PHP Version is 7.0.24
Ubuntu Version is 14.04 (running on Odroid - ARM)
MySQL Version is 14.14

Help appreciated.

[Doctrine\DBAL\Exception\DriverException]

maps:scan-photos fails on the file DSCN0009.JPG with:

In AbstractMySQLDriver.php line 106:                                                                                                                                                                                                               
                                                                                                                                                                                                                                                   
  [Doctrine\DBAL\Exception\DriverException]                                                                                                                                                                                                        
  An exception occurred while executing 'INSERT INTO `oc_maps_photos`(`file_id`,`lat`,`lng`,`user_id`,`date_taken`) VA                                                                                                                             
  LUES(?,?,?,?,?)' with params [144859, "\x4e\x41\x4e", "\x4e\x41\x4e", "arne", 1318384800]:                                                                                                                                                       
                                                                                                                                                                                                                                                   
  SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect double value: 'NAN' for column `owncloud`.`oc_maps_photos`.                                                                                                                             
  `lat` at row 1                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                   
Exception trace:                                                                                                                                                                                                                                   
 () at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106                                                                                                                                              
 Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169                                                                                                 
 Doctrine\DBAL\DBALException::wrapException() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:145                                                                                                                 
 Doctrine\DBAL\DBALException::driverExceptionDuringQuery() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:162                                                                                                        
 Doctrine\DBAL\Statement->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:256                                                                                                                                                
 OCP\AppFramework\Db\Mapper->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:130                                                                                                                                             
 OCP\AppFramework\Db\Mapper->insert() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:298                                                                                                                                        
 OCA\Maps\Service\PhotofilesService->insertPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:272                                                                                                                           
 OCA\Maps\Service\PhotofilesService->addPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:65                                                                                                                               
 OCA\Maps\Service\PhotofilesService->rescan() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:77                                                                                                                                      
 OCA\Maps\Command\RescanPhotos->rescanUserPhotos() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:68                                                                                                                                 
 OCA\Maps\Command\RescanPhotos->execute() at /srv/www/nextcloud/3rdparty/symfony/console/Command/Command.php:255                                                                                                                                   
 Symfony\Component\Console\Command\Command->run() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:908                                                                                                                               
 Symfony\Component\Console\Application->doRunCommand() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:269                                                                                                                          
 Symfony\Component\Console\Application->doRun() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:145                                                                                                                                 
 Symfony\Component\Console\Application->run() at /srv/www/nextcloud/lib/private/Console/Application.php:213                                                                                                                                        
 OC\Console\Application->run() at /srv/www/nextcloud/console.php:97                                                                                                                                                                                
 require_once() at /srv/www/nextcloud/occ:11                                                                                                                                                                                                       
                                        
In PDOStatement.php line 119:                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                   
  [Doctrine\DBAL\Driver\PDOException (22007)]                                                                                                                                                                                                      
  SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect double value: 'NAN' for column `owncloud`.`oc_maps_photos`.                                                                                                                             
  `lat` at row 1                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                   
Exception trace:                                                                                                                                                                                                                                   
 () at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119                                                                                                                                                     
 Doctrine\DBAL\Driver\PDOStatement->execute() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153                                                                                                                     
 Doctrine\DBAL\Statement->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:256                                                                                                                                                
 OCP\AppFramework\Db\Mapper->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:130                                                                                                                                             
 OCP\AppFramework\Db\Mapper->insert() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:298                                                                                                                                        
 OCA\Maps\Service\PhotofilesService->insertPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:272                                                                                                                           
 OCA\Maps\Service\PhotofilesService->addPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:65                                                                                                                               
 OCA\Maps\Service\PhotofilesService->rescan() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:77                                                                                                                                      
 OCA\Maps\Command\RescanPhotos->rescanUserPhotos() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:68                                                                                                                                 
 OCA\Maps\Command\RescanPhotos->execute() at /srv/www/nextcloud/3rdparty/symfony/console/Command/Command.php:255                                                                                                                                   
 Symfony\Component\Console\Command\Command->run() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:908                                                                                                                               
 Symfony\Component\Console\Application->doRunCommand() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:269                                                                                                                          
 Symfony\Component\Console\Application->doRun() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:145                                                                                                                                 
 Symfony\Component\Console\Application->run() at /srv/www/nextcloud/lib/private/Console/Application.php:213                                                                                                                                        
 OC\Console\Application->run() at /srv/www/nextcloud/console.php:97
 require_once() at /srv/www/nextcloud/occ:11

In PDOStatement.php line 117:
                                                                                                                        
  [PDOException (22007)]                                                                                                
  SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect double value: 'NAN' for column `owncloud`.`oc_maps_photos`.  
  `lat` at row 1                                                                                                        
                                                                                                                        

Exception trace:
 () at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
 PDOStatement->execute() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
 Doctrine\DBAL\Driver\PDOStatement->execute() at /srv/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:153                                                                                                                    
 Doctrine\DBAL\Statement->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:256
 OCP\AppFramework\Db\Mapper->execute() at /srv/www/nextcloud/lib/public/AppFramework/Db/Mapper.php:130
 OCP\AppFramework\Db\Mapper->insert() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:298
 OCA\Maps\Service\PhotofilesService->insertPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:272
 OCA\Maps\Service\PhotofilesService->addPhoto() at /srv/www/nextcloud/apps/maps/lib/Service/PhotofilesService.php:65
 OCA\Maps\Service\PhotofilesService->rescan() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:77
 OCA\Maps\Command\RescanPhotos->rescanUserPhotos() at /srv/www/nextcloud/apps/maps/lib/Command/RescanPhotos.php:68
 OCA\Maps\Command\RescanPhotos->execute() at /srv/www/nextcloud/3rdparty/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:908
 Symfony\Component\Console\Application->doRunCommand() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:269
 Symfony\Component\Console\Application->doRun() at /srv/www/nextcloud/3rdparty/symfony/console/Application.php:145
 Symfony\Component\Console\Application->run() at /srv/www/nextcloud/lib/private/Console/Application.php:213
 OC\Console\Application->run() at /srv/www/nextcloud/console.php:97
 require_once() at /srv/www/nextcloud/occ:11

maps:scan-photos [<user_id>]

Implement tests

(Aand reopening another issue of yours @Henni :)

#83 fixed phpunit. Now we should also use it to test the php backend.

Tests should be written for:

Controllers:

  • ContactsController
  • DevicesApiController
  • DevicesController
  • FavoritesApiController
  • FavoriteController
  • PageController
  • PhotosController
  • RoutingController
  • TracksController
  • UtlisController

Services:

  • AddressService
  • DevicesService
  • FavoritesService
  • GeophotoService
  • PhotofilesService
  • TracksService

@v1r0x As you implemented a lot of this, maybe you can also start creating tests.

This should either be part of Milestone 0.1 or 0.2

Open Viewer when clicking on photo

When clicking on a photo, right now it opens a new tab with the files view, which breaks the flow.

Much better would be to simply open the Viewer with the photo. Navigation left-right in the viewer should probably work just like in the folder, to go to the next newer or previous older picture. (In the case of a track this will also correspond to where you were first etc.)

Import location history from Google

I imported my google location history, as track, but this is not practicle. Reading the file like this at once tool 2.6 GB of ram in my case and showing everything on the map is no fun.

So probably it should be imported as device, or?

Any other ideas, to that topic?
@eneiluj you did something similar in phonetracks or?

Maps can not be installed.

Nextcloud

Version: 16.0.3.0

PHP

Version: 7.2.12

Database

Type: mysql

Version: 10.3.9

Description

We tried to install the Maps app on our NextCloud. We have loaded the current version from the master branch and assembled it according to instructions. That went well too. Unfortunately, the installation aborts with the following error message:

An exception occurred while executing 'CREATE TABLE oc_maps_address_geo (id BIGINT AUTO_INCREMENT NOT NULL, adr VARCHAR(255) NOT NULL, adr_norm VARCHAR(255) NOT NULL, lat DOUBLE PRECISION DEFAULT NULL, lng DOUBLE PRECISION DEFAULT NULL, looked_up TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_4C2424AB9CEC6B64C4BE9D6 (adr, adr_norm)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key

Can someone help us?

Bower notes it is deprecated

During make one of the errors is:

npm WARN deprecated [email protected]:
We don't recommend using Bower for new projects.
Please consider Yarn and Webpack or Parcel.
You can read how to migrate legacy project here:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/

So we should probably migrate? :)

[WIP] discussion around rework-again branch

Hey how,

@tacruc and @eneiluj have been working and will probably continue on rework-again branch initially forked from rework. We agreed to make PRs to this branch from explicitly named and one-feature focused branches.

For example, I'm currently working on eneiluj-tracks and made a PR (#38) to rework-again where it can be discussed.

Here is a sort of milestone to reach before the first release candidate πŸ€“ :

  • simple favorites management (#32)
  • simple photos display/placement (#32)
  • simple contacts display/placement (#34)
  • calendar events
  • simple routing
  • simple tracks display (#38)
  • simple devices locations get/display (#43)
  • ability to search in all layers (completion in search input etc...)
  • time based filtering system (with a double slider)
  • guess photo positions with currently loaded tracks and devices information

Details to take care of:

  • how/when do we set filtering slider values
  • file hooks are to be reviewed
  • in mobile view, swiping map to the right brings out the navigation menu
  • contact of address book shared to me can be edited (placed) even if it's readonly

Could not load favorites

Got this notification after opening the app for the first time on my installation which does not have any favorites yet.

Events on the map

It would be cool to have events show up on the map when they have a location set and are in the near future (the next 4 weeks).

@MorrisJobke mentioned that GMaps does this. Would be a great way to inter-connect Nextcloud apps like this! cc @v1r0x @brantje and @georgehrke for Calendar

[rework branch] No gulpfile found

I built the app like described in the README file but I run into the following error. It says there is no gulpfile.

$ make
make npm
make[1]: Entering directory `/var/www/nextcloud/apps/maps'
npm run build

> [email protected] prebuild /var/www/nextcloud/apps/maps
> npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update


> [email protected] build /var/www/nextcloud/apps/maps
> node node_modules/gulp-cli/bin/gulp.js

[18:59:46] No gulpfile found
npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! not ok code 0
make[1]: *** [npm] Error 1
make[1]: Leaving directory `/var/www/nextcloud/apps/maps'
make: *** [build] Error 2

map freezes on mobile after panning

When moving the map around with a touch gesture on Android, the map often freezes for a second or so and it cannot be moved further.

This does not happen on the desktop version.

How to reproduce:

  1. Move the map around with a touch gesture
  2. Finish touch gesture by releasing fingers from touch screen
  3. Try to move the map around again, but see that the map is frozen.

cluster photo

interesting would be the possibility the photos that form a cluster example a radius of 20 km would open on a list at the moment need to click each of the photos to watch them

Switch to new tile provider

Following the MapQuest open API shutdown we need to check for a new tile provider.

GNOME Maps uses Mapbox with a community API key over a GNOME proxy: https://mail.gnome.org/archives/commits-list/2016-July/msg07462.html
I contacted them to find out how we can do it: https://twitter.com/jancborchardt/status/796054542144176131

A possible alternative would be the Wikimedia Cartographical project: https://www.mediawiki.org/wiki/Maps#Production_maps_cluster

cc @v1r0x @nextcloud/maps @schiessle

get and display device positions

How should we do that?

Store

In the DB, there could be a devices and a points table.

Send

There could be multiple ways to send points to Maps:

  • passive: when map location control is enabled, positions could be sent periodically with user agent as device ID
  • active: there could be an API for clients to actively send their position to Maps

Display

A foldable devices side menu entry with a sub entry for each device. It would be possible to show/hide each device display. Filtering would have an effect on which points are displayed.

Should points be displayed as a line or as markers? Line is problematic because it links positions that can be very far away from each other. Markers are problematic because it's uggly and heavy to render when there are too many.

Extra

It would be nice to be able to share device positions with a Nextcloud user or with a public link (like files). There would be a list of shares. From the receiver point of view, it would show points starting from the moment device owner started to share. It would be possible to set an expiration date.

  • sharing
  • geofences (alerts/notifications when a device enters/leaves a defined area)
  • export device position history (all/visible) to gpx

to be continued

Photos on the map

Using EXIF geolocation data, we could have pictures show up on the map when they have a location set. That could simply be sourced from the Files app (doesn’t really have much to do with the Gallery app).

cc @v1r0x @brantje for Maps and cc @oparoz @icewind1991 for photos and metadata.

Add info on tile layers & fair use somewhere, allow to add own tile provider

As far as I know, all the tile providers we have are kind of "fair use", that is if you have a big instance and use it a lot you should actually not use them and add your own tile provider. Right?

We should probably:

  • Clarify this info about the tile servers and thank them somewhere
  • Link how to add a custom Mapbox/other provider url for tile layer (we only have that for routing atm)
  • Link an easy guide how to host your own tile server, probably with https://openmaptiles.org ?

What do you think @nextcloud/maps?

Sync with other maps apps (Favorites, Tracks, etc.)

We should work on having these apps sync with us:

(Carried over from @eneiluj’s notes in #56 )

TODO before first release

Here is an extensible list of what's missing before we can think about making a first release:

General

  • get a certificate to publish to appstore
  • fix/test makefile "appstore" target
  • add filtypes actions to import favorites/devices from gpx/kml/kmz
  • fix CI script:
    • at some point test complained it couldn't create user folder
    • autoloader problem (are we doing something wrong when installing NC?)
  • fix second migration script which does not declare auto increment field as primary key
  • make some tests (at least PhpUnit)
  • use Webpack to manage JS dependencies
  • make time slider optional
  • use a library to write valid XML when exporting things

Routing

  • implement admin options to setup routing: choose routing engine (Osrm/Graphhopper...), service URL, API key, routing type (car, bike, foot...)
  • let the user choose routing type in the UI (if declared as possible in admin settings)
  • add routing button to export track (was in sidebar before)

Contacts

  • display contacts that have an address #34

Favorites

  • have at least one client able to sync with us:
    • Marble would require a few changes to be compatible
    • Gnome Maps might become compatible this summer
    • OsmAnd would be nice! Nothing like that yet.

Tracks

  • add a marker with an icon where the tracks begin
  • list all tracks, use file hooks to populate track list just like it's done for photos
  • make the track list sortable by filedate/filename
  • make tracks searchable by file name

Devices

  • clarify device identification (currently: user agent is the ID)
  • if we keep user agent as ID, parse it better (avoid browser version number for example)
  • make PhoneTrack-Android able to log to Maps

Photos

  • improve what happens when clicking on a photo (use gallery viewer?)
  • handle group sharing events/hooks
  • make occ maps:scan-photos verbose
  • scan photos after app installation
  • hide non-localized photos feature for now

ToDo non localized pictures

Backend

  • Different gpx loading to allow for big gpx files as coming from google timeline.
  • do the matching smarter.
  • Cache TimeordedPointSets for x seconds
  • Change API for lazy loading
  • Read Point from gpx wptType, rteType, trkType which are not in a trkseg (allready done)

Frontend

  • lazy load nonlocalizedPhots
  • restructure Photo menu entry, plug bot photos in one main menu entry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.