FAQ
Mark,

I have no idea where the code for that example ran off to... I notice that
the link for the source code points to our earthquakes example. Not super
helpful! We created a task to fix up that link and find the missing source
code.

In the meantime, you may want to check out the code for our GeoFire SF Muni
demo
<https://github.com/firebase/geofire-js/tree/master/examples/sfVehicles>.
It does a lot of the same things. You specifically asked about the animated
markers. We accomplish this by via some great computer science (aka hacking
the Google Maps API). You can see the method we created here
<https://github.com/firebase/geofire-js/blob/7aa998f3cd0658a0584701c272828ad9e13ea4be/examples/sfVehicles/js/sfVehicles.js#L146-L169>
and then how we call it here
<https://github.com/firebase/geofire-js/blob/7aa998f3cd0658a0584701c272828ad9e13ea4be/examples/sfVehicles/js/sfVehicles.js#L63>.
It's not perfect, but it works well enough. There are some simple
animations built into Google Maps itself, but nothing was flexible enough
for our use case.

Good luck!
Jacob
On Thu, Apr 16, 2015 at 1:02 PM, Mark Johannessen wrote:

Is the code available for the example live transit map at

https://www.firebase.com/docs/open-data/transit.html

It appears each individual icon/div on the map updates independently.
I've used a loop to iterate through the change of vehicles, then match ids
to an array of icon objects, but that seems to be way too slow and the icon
movement is jumpy and not more fluid like the example.

So, posting this particular code would be helpful in the future for
dealing with handling ongoing child data changes with a large set of
children objects.

--
You received this message because you are subscribed to the Google Groups
"Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/firebase-angular/9d17d1e6-126c-4fcf-86a4-24d187994788%40googlegroups.com
<https://groups.google.com/d/msgid/firebase-angular/9d17d1e6-126c-4fcf-86a4-24d187994788%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/CAGcMwsAGXPNT7FGsg6-JvhU7a5aCzSdrB4AHyk0HE8c%3DM4ZCdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupfirebase-angular @
postedApr 20, '15 at 12:41a
activeApr 21, '15 at 6:21a
posts2
users2

2 users in discussion

Jacob Wenger: 1 post Mark Johannessen: 1 post

People

Translate

site design / logo © 2021 Grokbase