Firestore Geoquery

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 87

  • @carrillocarlosce
    @carrillocarlosce 6 лет назад +11

    You just made my day, I've been waiting for this for a long time, I had to use a workaround in my app with firebase realtime database in order to make this feature work, now I can rewrite that code and keep working only with firestore, again thanks for making our developer life easier, keep sharing your knoledge

    • @Fireship
      @Fireship  6 лет назад +2

      I had a project for a client that simply was not feasible in the RTDB, so that compelled me to package this into a library.

    • @carrillocarlosce
      @carrillocarlosce 6 лет назад

      Thats awesome, I hope soon I can become pro member, and keep learning from you!!,

    • @louisart92
      @louisart92 6 лет назад

      And mine!!!, I m gonna try it on ionic but should be exactly the same

  • @carlosalvarez4188
    @carlosalvarez4188 6 лет назад +68

    Compatible with both flat earth and round earth theories lol hahah

    • @Fireship
      @Fireship  6 лет назад +3

      I'm pretty sure the math works the same for both theories :)

    • @phillachmann3552
      @phillachmann3552 6 лет назад +1

      Compatible with those who are intelligent and those who ignore proven science!

    • @andrefortin9917
      @andrefortin9917 6 лет назад +1

      Your comment made my day. Hahaha.

    • @BenBodan
      @BenBodan 5 лет назад

      I heard Flutter instead of Flat-Earth, happy for no reason.

    • @developer-juice-Khailenno
      @developer-juice-Khailenno 4 года назад

      lmao

  • @WealthThroughValue
    @WealthThroughValue 6 лет назад +2

    Great work. Absolutely brilliant I gotta say. I almost made the simular stuff for my last project, but had to give up (not by geo queries though, but filtering) But still it's not as powerful as MongoDB. I mean with firebase it always looks like you fighting against the system limitations rather then developing. You'd probably either very dedicated person or have a nerve for it. Good job anyway. Appreciate it a lot.

    • @Fireship
      @Fireship  6 лет назад +1

      Thank you. Mongo has better geospatial support but I hope we see Firestore improve in this area in the future.

  • @ShufflePetro
    @ShufflePetro 5 месяцев назад

    00:08 Building real-time geolocation features using Firestore and Angular Google Maps.
    01:07 Geo queries in Firestore are different from normal queries
    02:10 Utilizing geohashes for precise geo queries
    03:08 Initialize Firebase app and Angular Google Maps in Angular or Ionic.
    04:08 Geoqueries allow multiple geo points on a single document.
    05:14 Firestore Geoquery enables querying against multiple geo points within a single document.
    06:20 Using switch map allows for reactive changes in radius and queries.
    07:27 Firestore Geoquery allows real-time updates based on user position.

  • @mateja176
    @mateja176 6 лет назад +2

    Amazing, thanks Jeff!! I've recently been working on a location based app and I've decided to go the easy route and differentiate users by city, but the app might just get a level up, thanks to this video.

    • @Fireship
      @Fireship  6 лет назад +1

      I have a bunch of additional features on another branch for this lib, like a query inside bounding boxes and stuff like that. Please let me know how it goes if you use it :)

    • @mateja176
      @mateja176 6 лет назад

      Angular Firebase Gladly :)

    • @satisfakshin
      @satisfakshin 6 лет назад

      Same here!

  • @carltongordon
    @carltongordon 6 лет назад +2

    wow!!! you just made me replace my entire ng5 project with ths lol thanks jeff you the best

    • @Fireship
      @Fireship  6 лет назад +1

      Cool! Let me know if you run into any issues on Github :)

  • @ChrisEsplin
    @ChrisEsplin 6 лет назад +1

    Rad! I hadn't heard of geohashes before. I've never had a use case for them... so I don't feel too bad about it. But now I need to find a good reason to spend a few days building some maps :)

    • @Fireship
      @Fireship  6 лет назад

      I went down a rabbit hole with geohashes recently. You can also use them to build AR features, like Pokemon GO.

  • @boogiedowngames6893
    @boogiedowngames6893 6 лет назад +1

    Cool!! Was busting my head trying to figure this out. Thanks for the solution. We are pro members as well.

    • @Fireship
      @Fireship  6 лет назад

      Nice! Message me on slack if you need support with it :)

  • @yogenp
    @yogenp 6 лет назад

    Amazing contribution again, Jeff.

  • @sanjyotsatvi6954
    @sanjyotsatvi6954 5 лет назад +2

    i am getting this error - Property 'collection' does not exist on type 'GeoFireClient'

  • @SolomonKahsai
    @SolomonKahsai 6 лет назад +1

    well well well, you are simply perfect !!!!

  • @pdela72
    @pdela72 6 лет назад +1

    Awesome tutorial Jeff. I have a question, although not totally related to Geo problems: I see you have to initialize AGM with Google Maps API key. What about security? Hard coding the API key directly in the spa makes it visible to whoever wants to look for it. Is there another pattern I can use? Eventually storing the API key in Firestore itself (despite rules shouldn't prevent any user to read the data, thus same problem). Storing in firebase functions config and return on Https trigger? What else to ensure security of the API key? Many thanks!

    • @amacodes7347
      @amacodes7347 2 года назад

      storing it in an environment variable would be better.

    • @pdela72
      @pdela72 2 года назад

      @@amacodes7347 I don't understand what environment variable in a client spa app? Like angular app?

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 6 лет назад +1

    Thank you for this awesome video

  • @j4nch
    @j4nch 5 лет назад

    How to link the radius with the zoom? I want to display everything that is currently visible in the map? The goal being that the user isn't aware that I don't show everything? Also, how would you do to not only react on a radius change but also on Latitude/Longitude change? Since you can pipe only on one of the 3 elements?

  • @alexanderchele8978
    @alexanderchele8978 4 года назад

    Hello, could you do with the example of if it leaves the geofence, present an alert with angle and firebase

  • @EwaldDieser
    @EwaldDieser 2 года назад

    Fantastic! Exactly what I need to implement right now.

  • @urmilshroff
    @urmilshroff 5 лет назад

    Hey there! I'm trying to implement something exactly like this in my Flutter app, where I want to create a kind of density hotspot/heatmap wherever there are multiple users in a certain area. Do you have any solutions? Google Maps Flutter package currently does not support displaying heatmaps, so I'm kind of stuck.

  • @pandarzzz
    @pandarzzz 6 лет назад

    Thank you for sharing this informative video! 🐰🖐🏻

  • @storylineteam
    @storylineteam 4 года назад +1

    Amazing! Can you please do the same video for flutter?

  • @stevengao8345
    @stevengao8345 6 лет назад +1

    Thanks for this great info amd tutorial, Sorry, a noob question, is this geoquery api can be used in ios or android app as long as it is using firebase as backend ? Thanks

    • @tonnie7079
      @tonnie7079 4 года назад

      trying to get around this in Android n m stuck ... any leads?

  • @will_abule
    @will_abule 6 лет назад +1

    😱Oh! Awesome! I've been waiting for this for a long time. Can I do things like layout, routing, symbology plus you got my star 🌟 all ready thanks. I'll have to go through the your docs to see how far I can actually use this. I ❤️ you and your content.

    • @Fireship
      @Fireship  6 лет назад

      Awesome :) Let me know if there's a feature you want to see, my goal is to make realtime maps as easy as possible.

    • @tonyrusignuolo
      @tonyrusignuolo 5 лет назад

      @@Fireship data pagination and limits would be great! I'm thinking about working on a fork, so recommendations would be appreciated. Thanks!

  • @7lnbo7a
    @7lnbo7a 6 лет назад +1

    nice video,, As a pro member I adore your tutorials,,for Geo Search I wanted to user Algolia Geo Search,, what do you think about that??? since I am heavily using algolia with my firebase web app.. do u recommend your library over Algolia GEO Search??
    Regards

    • @Fireship
      @Fireship  6 лет назад

      Algolia geo search is excellent. If you already have your data indexed there I would definitely consider that the best option.

    • @7lnbo7a
      @7lnbo7a 6 лет назад

      @@Fireship Great,, thanks for feedback

  • @ChranMurugapandi
    @ChranMurugapandi 6 лет назад

    Great Tutorial, by the way, what program did you use for video editing? The intro was too sick I had to watch it twice lol

    • @Fireship
      @Fireship  6 лет назад

      Thanks! I use adobe aftereffects with the help of some pre-built animation elements

  • @hartneil93
    @hartneil93 6 лет назад +2

    This video is AMEZING!, thank you soo much!!
    Is there a way to do pagination with that?

  • @johnrivelt
    @johnrivelt 6 лет назад

    Thank you for this video, you have excellent presentation skill. Does it filter points from client side or server side ? As I need to deal with thousands points on mobile device, I am wondering performance.

    • @Fireship
      @Fireship  6 лет назад

      It actually does a little of both. It calculates the minimum geohash squares guaranteed to cover the radius and filters those server side. This can return extra results that are then filtered client-side, but that depends on the size of the radius and distribution of points.

  • @kawaiifreak97
    @kawaiifreak97 5 лет назад

    thank you so much for this! is there a way to query nested collections? thank you!

  • @iansong1676
    @iansong1676 4 года назад

    Will I also be able to use the GeoFireX library with native IOS(Swift) and android(Kotlin) apps?

  • @DheerajRijhwani
    @DheerajRijhwani 6 лет назад +1

    Sir, How I can load external Html on a single component. I want to build a blog by using MEAN. Please suggest. Happy Coding:)

    • @info-namec768
      @info-namec768 6 лет назад

      typescript compile the code, you may load html, but add functionalities into it would not be easy
      stackoverflow.com/questions/46659860/angular4-load-external-html-page-in-a-div

  • @satisfakshin
    @satisfakshin 6 лет назад

    Thank you for this! 😭

  • @info-namec768
    @info-namec768 6 лет назад +1

    Aye sir! thanks for this awesome material

    • @Fireship
      @Fireship  6 лет назад

      Thank you, it's a fun area

  • @Rose-jp7dm
    @Rose-jp7dm 6 лет назад

    Is it possible to get a code of this example please!?

  • @1amb635
    @1amb635 6 лет назад

    Amazing! Thank you!

  • @MarcPujolGualdo
    @MarcPujolGualdo 6 лет назад

    It is possible to use it in NodeJS? (Cloud Function)
    Error: Argument "onNext" is not a valid function.

    • @david-tracy
      @david-tracy 5 лет назад

      Marc Pujol Gualdo hey Marc, any update bro?

  • @chungtommy5128
    @chungtommy5128 4 года назад

    is it possibe to implement this to Laravel?

  • @runfunmc64
    @runfunmc64 5 лет назад

    Anyone know if there is a way to unsubscribe from a real time data stream?

  • @sandeeppatil5925
    @sandeeppatil5925 5 лет назад

    Is there one for React Native ?

  • @vitikahappy
    @vitikahappy 4 года назад

    Who can help me with geoquering nearby documents in Firebase Firestore in Android Studio (Java)?
    I've been searching this topic and the results I get are only either it is impossible or there is some solution but no clear example in Android Studio or Java.
    I know I am a newbie, that's why I am asking for help.
    Can someone please reply?

  • @abbaskagdi1
    @abbaskagdi1 6 лет назад +2

    2:39 lol

  • @pierojoss
    @pierojoss 6 лет назад +1

    Awesome!

    • @Fireship
      @Fireship  6 лет назад +1

      Thank you Pedro :)

  • @humaneBicycle
    @humaneBicycle 2 года назад +2

    iTs CoMpaTibLe wiTh fLat eARTh tHeORiEs.

  • @jasonc6241992
    @jasonc6241992 4 года назад

    does not work with firebase 8+

  • @fitzmode
    @fitzmode 6 лет назад

    There's also a port of Geofire for Firestore called Geofirestore. github.com/MichaelSolati/geofirestore

    • @Fireship
      @Fireship  6 лет назад

      That is a very well done port of Geofire and could be a good choice depending on your needs. In our case, we had big collections that needed to be limited by a query first and also needed multiple geopoints on a document, as well as some other specialized internal stuff.

  • @vishnuvardhan9300
    @vishnuvardhan9300 6 лет назад

    Awesomeness

  • @ekhmoi4552
    @ekhmoi4552 6 лет назад +1

    Nice video. But it is not that hard to build from scratch thanks to MongoDB's Geospatial Query Operators.

    • @Fireship
      @Fireship  6 лет назад

      I've worked with Mongo's GeoSpatial stuff in the past and this was loosely inspired by it. Firestore has hinted at native geolocation support, so hoping that lands as a feature in the future.

  • @manofleisure5099
    @manofleisure5099 6 лет назад

    U could make a multi million dollar app with this one tutorial Haha 😂

  • @TheGenZProgrammer
    @TheGenZProgrammer 5 лет назад

    who else thought he or she saw donald glover

  • @ibrahimmohammed3484
    @ibrahimmohammed3484 6 лет назад

    this is not ideal at all for any GIS web development or apps that just has any spatial data

    • @Fireship
      @Fireship  6 лет назад

      It's not a fully featured geospatial db, but does provide a basic pathway for features like this. What is ideal for GIS web development?

    • @ibrahimmohammed3484
      @ibrahimmohammed3484 6 лет назад +1

      i understand but even that basic is too complicated using firebase, all that just to query data that falls within a certain buffer distance, the ideal player for such operations here is Postgresql with Postgis extension.
      i think mongodb have nearly competitive spatial operations now but can't really judge since i haven't used it yet and also it depends really on what purpose your mapping needs, you can use file database like sqlite if your data don't change a lot, but as i said the big player for me here is postgis

    • @Fireship
      @Fireship  6 лет назад +1

      Thanks for the info. I have used Mongo and it is superior in this area, but Firebase has hinted at native support for Firestore geo in future. Postgis seems like the gold standard for most, but I imagine it's harder to get setup with realtime listeners.

  • @gunaavanthigai924
    @gunaavanthigai924 3 года назад

    Sir,

  • @garethdavies2308
    @garethdavies2308 3 года назад

    Nobody uses Angular how to do this in React Hooks?