demo icon indicating copy to clipboard operation
demo copied to clipboard

Add google map field to demo

Open pxpm opened this issue 3 years ago • 1 comments

added two google map field examples, one in Owner and other in Passport to show both saving options (same column json or multiple columns).

pxpm avatar Oct 14 '22 10:10 pxpm

Good Job @pxpm 🎉🎉

EG-Mohamed avatar Oct 14 '22 10:10 EG-Mohamed

Hello @pxpm

Maps works great! i just have a fail with "Get my location button" (see screeshont)

screenshot-backpack test-2022 11 28-09_46_49

Screenshot 2022-11-28 at 09 46 09

But maps load normal and i can move pin and show me new location.

screenshot-backpack test-2022 11 28-09_45_38

Let me know if something is wrong with my config, i set my api key in "GOOGLE_PLACES_KEY".

Cheers.

jcastroa87 avatar Nov 28 '22 12:11 jcastroa87

@jorgetwgroup you browser location is not available locally without https 👍

@tabacitu can you create a subdomain for this branch online so that we fully test the location services ? Something like https://demomaps.backpackforlaravel.com ?

Going through the route of getting https locally is a pain, trust me, I've been there more than once!

Cheers

pxpm avatar Nov 28 '22 13:11 pxpm

@pxpm I left y comments here. I was able to test it locally with https since I use Mamp Pro for it and it makes it painless :)

maurohmartinez avatar Dec 01 '22 11:12 maurohmartinez

Hmm... I can confirm they work in both places but... I wouldn't agree that they make sense in those CRUDs @pxpm . Quite the contrary - I think we had a few "clean" forms there with Passport and Owner, and adding this example there... bloats them up. I especially dislike how the Owner form looks now, with all that white space, not pretty at all:

Let's please:

  • [x] move the google_map field to the Monster form, at the bottom of the "Time and space" tab; that's where we have ALL our field types so... why wouldn't it be there?! plus, then it will be picked up by the other related CRUDs so we can easily test it's working with CrudField JS API, etc;
  • [x] if we need to show a different functionality for it (eg. store lat and long in different columns) we should also add it to another "bloated" CRUD, for example... Cave? Yeah, I think Cave is a good one, it only has two fields so it won't be messy at the end of that; plus, it makes more sense for a Cave to have lat and long than a Passport or Owner, right?

tabacitu avatar Dec 27 '22 13:12 tabacitu

Done both things, moved one of the map fields to monster that stores in a single fake column, and another one to cave that stores the inputs separatelly.

👍

pxpm avatar Dec 27 '22 18:12 pxpm