Having a very difficult time populating my map with my json Firebase dataRetrieve location from Firebase and put marker on google map api for android applicationWhat's the best way of structuring data on firebase?Get children using orderByChild-equalsTo in Firebase-AndroidFirebase cloud functions is very slowAdding Social Media Share Logic From Firebase in AndroidPopulating a ListView with firebase dataPopulate Map With Firebase dataPopulating Android spinner with Firebase DataPopulating RecyclerView with two sets of data from FirebaseUpdated global variables does not reflect inside ValueEventListener's onCancelled method
Can a non-EU citizen travel within schengen zone freely without passport?
Boots: Does light damage affect waterproofing?
Comment dit-on « I’ll tell you what » ?
Were pen cap holes designed to prevent death by suffocation if swallowed?
Could IPv6 make NAT / port numbers redundant?
Leading and Suffering Numbers
Ticket sales for Queen at the Live Aid
In what episode of TOS did a character on the bridge make a comment about raising one to some power?
How to capture more stars?
Declining an unreasonable request from a superior
What are these (utility?) boxes at the side of the house?
Different PCB color ( is it different material? )
What caused the tendency for conservatives to not support climate change reform?
Where did the “Vikings wear helmets with horn” stereotype come from and why?
Why does the UK have more political parties than the US?
Question about exercise 11.5 in TeXbook
What is a subpixel in Super Mario Bros, and how does it relate to wall clipping?
Can't use numexpr in horizontal mode
Do firearms count as ranged weapons?
How do I subvert the tropes of a train heist?
How to extract lower and upper bound in numeric format from a confidence interval string?
What does the behaviour of water on the skin of an aircraft in flight tell us?
What F1 in name of seeds/varieties means?
Split polygon using another polygon in QGIS
Having a very difficult time populating my map with my json Firebase data
Retrieve location from Firebase and put marker on google map api for android applicationWhat's the best way of structuring data on firebase?Get children using orderByChild-equalsTo in Firebase-AndroidFirebase cloud functions is very slowAdding Social Media Share Logic From Firebase in AndroidPopulating a ListView with firebase dataPopulate Map With Firebase dataPopulating Android spinner with Firebase DataPopulating RecyclerView with two sets of data from FirebaseUpdated global variables does not reflect inside ValueEventListener's onCancelled method
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am trying to grab data(lat and long) from Firebase and place it as markers to populate my Google map. I am using Kotlin.
jsonFirebaseData
I have tried the official Firebase documentation to read data, as well as tried:
http://myfirebasemaps.ga/
Also tried:
Retrieve location from Firebase and put marker on google map api for android application
private lateinit var mCompanies: DatabaseReference
onCreate section:
mCompanies = FirebaseDatabase.getInstance().reference
onMapReady section:
fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().getReference().child("results")
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Also I have a data class:
data class Company(
var city: String,
var latitude: Double,
var longitude: Double,
var name: String
)
constructor() : this("", 0.0, 0.0, "")
Nothing happens. App does not crash, but no markers gets added from my firebase.
EDIT
I created a private function:
private fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().reference
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
if (dataSnapshot.exists())
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
Log.d("onDataChange", company.toString())
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Then I call the function in onMapReady after the map has been created.
Log.d("onDataChange", company.toString())
displays this on Logcat:
D/onDataChange: Company(city=, latitude=0.0, longitude=0.0, name=)
When I change it to company!!.city nothing shows up.
android firebase firebase-realtime-database kotlin
|
show 7 more comments
I am trying to grab data(lat and long) from Firebase and place it as markers to populate my Google map. I am using Kotlin.
jsonFirebaseData
I have tried the official Firebase documentation to read data, as well as tried:
http://myfirebasemaps.ga/
Also tried:
Retrieve location from Firebase and put marker on google map api for android application
private lateinit var mCompanies: DatabaseReference
onCreate section:
mCompanies = FirebaseDatabase.getInstance().reference
onMapReady section:
fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().getReference().child("results")
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Also I have a data class:
data class Company(
var city: String,
var latitude: Double,
var longitude: Double,
var name: String
)
constructor() : this("", 0.0, 0.0, "")
Nothing happens. App does not crash, but no markers gets added from my firebase.
EDIT
I created a private function:
private fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().reference
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
if (dataSnapshot.exists())
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
Log.d("onDataChange", company.toString())
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Then I call the function in onMapReady after the map has been created.
Log.d("onDataChange", company.toString())
displays this on Logcat:
D/onDataChange: Company(city=, latitude=0.0, longitude=0.0, name=)
When I change it to company!!.city nothing shows up.
android firebase firebase-realtime-database kotlin
Is youronDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?
– Alex Mamo
Mar 24 at 9:06
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
DoesLog.w("MapsActivity", databaseError.toException())
print something?
– Alex Mamo
Mar 24 at 9:30
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
If y ouronDataChange
is not called, are you sure you are connected to the internet?
– Alex Mamo
Mar 24 at 9:41
|
show 7 more comments
I am trying to grab data(lat and long) from Firebase and place it as markers to populate my Google map. I am using Kotlin.
jsonFirebaseData
I have tried the official Firebase documentation to read data, as well as tried:
http://myfirebasemaps.ga/
Also tried:
Retrieve location from Firebase and put marker on google map api for android application
private lateinit var mCompanies: DatabaseReference
onCreate section:
mCompanies = FirebaseDatabase.getInstance().reference
onMapReady section:
fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().getReference().child("results")
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Also I have a data class:
data class Company(
var city: String,
var latitude: Double,
var longitude: Double,
var name: String
)
constructor() : this("", 0.0, 0.0, "")
Nothing happens. App does not crash, but no markers gets added from my firebase.
EDIT
I created a private function:
private fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().reference
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
if (dataSnapshot.exists())
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
Log.d("onDataChange", company.toString())
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Then I call the function in onMapReady after the map has been created.
Log.d("onDataChange", company.toString())
displays this on Logcat:
D/onDataChange: Company(city=, latitude=0.0, longitude=0.0, name=)
When I change it to company!!.city nothing shows up.
android firebase firebase-realtime-database kotlin
I am trying to grab data(lat and long) from Firebase and place it as markers to populate my Google map. I am using Kotlin.
jsonFirebaseData
I have tried the official Firebase documentation to read data, as well as tried:
http://myfirebasemaps.ga/
Also tried:
Retrieve location from Firebase and put marker on google map api for android application
private lateinit var mCompanies: DatabaseReference
onCreate section:
mCompanies = FirebaseDatabase.getInstance().reference
onMapReady section:
fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().getReference().child("results")
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Also I have a data class:
data class Company(
var city: String,
var latitude: Double,
var longitude: Double,
var name: String
)
constructor() : this("", 0.0, 0.0, "")
Nothing happens. App does not crash, but no markers gets added from my firebase.
EDIT
I created a private function:
private fun loadMarkersFromDB()
mCompanies = FirebaseDatabase.getInstance().reference
mCompanies.addListenerForSingleValueEvent(object : ValueEventListener
override fun onDataChange(dataSnapshot: DataSnapshot)
if (dataSnapshot.exists())
for (s in dataSnapshot.children)
var company = dataSnapshot.getValue(Company::class.java)
var location = LatLng(company!!.latitude, company.longitude!!)
mMap.addMarker(MarkerOptions().position(location).title(company!!.name).snippet(company!!.city))
.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW))
Log.d("onDataChange", company.toString())
override fun onCancelled(databaseError: DatabaseError)
Log.w("MapsActivity", databaseError.toException())
)
Then I call the function in onMapReady after the map has been created.
Log.d("onDataChange", company.toString())
displays this on Logcat:
D/onDataChange: Company(city=, latitude=0.0, longitude=0.0, name=)
When I change it to company!!.city nothing shows up.
android firebase firebase-realtime-database kotlin
android firebase firebase-realtime-database kotlin
edited Mar 24 at 11:08
Alex Mamo
50.1k83169
50.1k83169
asked Mar 24 at 9:00
jjjj-unitjjjj-unit
106
106
Is youronDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?
– Alex Mamo
Mar 24 at 9:06
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
DoesLog.w("MapsActivity", databaseError.toException())
print something?
– Alex Mamo
Mar 24 at 9:30
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
If y ouronDataChange
is not called, are you sure you are connected to the internet?
– Alex Mamo
Mar 24 at 9:41
|
show 7 more comments
Is youronDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?
– Alex Mamo
Mar 24 at 9:06
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
DoesLog.w("MapsActivity", databaseError.toException())
print something?
– Alex Mamo
Mar 24 at 9:30
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
If y ouronDataChange
is not called, are you sure you are connected to the internet?
– Alex Mamo
Mar 24 at 9:41
Is your
onDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?– Alex Mamo
Mar 24 at 9:06
Is your
onDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?– Alex Mamo
Mar 24 at 9:06
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
Does
Log.w("MapsActivity", databaseError.toException())
print something?– Alex Mamo
Mar 24 at 9:30
Does
Log.w("MapsActivity", databaseError.toException())
print something?– Alex Mamo
Mar 24 at 9:30
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
If y our
onDataChange
is not called, are you sure you are connected to the internet?– Alex Mamo
Mar 24 at 9:41
If y our
onDataChange
is not called, are you sure you are connected to the internet?– Alex Mamo
Mar 24 at 9:41
|
show 7 more comments
1 Answer
1
active
oldest
votes
You aren't getting anything because your reference points to the root node and not to the results
node. To sovle this, simply change the following line of code:
mCompanies.addListenerForSingleValueEvent(/* ... */)
to
mCompanies.child("data").child("results").addListenerForSingleValueEvent(/* ... */)
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.
– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have thedata
node between the root node andresults
node, it should also be added with child call as in my updated answer. Does it work now?
– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322153%2fhaving-a-very-difficult-time-populating-my-map-with-my-json-firebase-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You aren't getting anything because your reference points to the root node and not to the results
node. To sovle this, simply change the following line of code:
mCompanies.addListenerForSingleValueEvent(/* ... */)
to
mCompanies.child("data").child("results").addListenerForSingleValueEvent(/* ... */)
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.
– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have thedata
node between the root node andresults
node, it should also be added with child call as in my updated answer. Does it work now?
– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
add a comment |
You aren't getting anything because your reference points to the root node and not to the results
node. To sovle this, simply change the following line of code:
mCompanies.addListenerForSingleValueEvent(/* ... */)
to
mCompanies.child("data").child("results").addListenerForSingleValueEvent(/* ... */)
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.
– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have thedata
node between the root node andresults
node, it should also be added with child call as in my updated answer. Does it work now?
– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
add a comment |
You aren't getting anything because your reference points to the root node and not to the results
node. To sovle this, simply change the following line of code:
mCompanies.addListenerForSingleValueEvent(/* ... */)
to
mCompanies.child("data").child("results").addListenerForSingleValueEvent(/* ... */)
You aren't getting anything because your reference points to the root node and not to the results
node. To sovle this, simply change the following line of code:
mCompanies.addListenerForSingleValueEvent(/* ... */)
to
mCompanies.child("data").child("results").addListenerForSingleValueEvent(/* ... */)
edited Mar 24 at 11:36
answered Mar 24 at 10:59
Alex MamoAlex Mamo
50.1k83169
50.1k83169
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.
– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have thedata
node between the root node andresults
node, it should also be added with child call as in my updated answer. Does it work now?
– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
add a comment |
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.
– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have thedata
node between the root node andresults
node, it should also be added with child call as in my updated answer. Does it work now?
– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
ok I changed it to this however I still get nothing on the map, and now my logcat is also blank with: Log.d("onDataChange", company.toString()) also tried Log.d("onDataChange", company!!.city) and I get nothing still.
– jjjj-unit
Mar 24 at 11:10
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.– Alex Mamo
Mar 24 at 11:14
data
node is your root node? Or do you have any other nodes? If you have, please add another more detailed screenshot.– Alex Mamo
Mar 24 at 11:14
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
I have the project name at the very top and followed by data then results
– jjjj-unit
Mar 24 at 11:34
If you have the
data
node between the root node and results
node, it should also be added with child call as in my updated answer. Does it work now?– Alex Mamo
Mar 24 at 11:37
If you have the
data
node between the root node and results
node, it should also be added with child call as in my updated answer. Does it work now?– Alex Mamo
Mar 24 at 11:37
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
YES IT WORKS!! THANK YOU!!
– jjjj-unit
Mar 24 at 15:56
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322153%2fhaving-a-very-difficult-time-populating-my-map-with-my-json-firebase-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is your
onDataChange()
even triggered? If you try to log the name of the city, is it printed out in the logcat?– Alex Mamo
Mar 24 at 9:06
Hi, just tried it and it looks like nothing is showing up in logcat
– jjjj-unit
Mar 24 at 9:29
Does
Log.w("MapsActivity", databaseError.toException())
print something?– Alex Mamo
Mar 24 at 9:30
No, nothing shows up in Logcat
– jjjj-unit
Mar 24 at 9:36
If y our
onDataChange
is not called, are you sure you are connected to the internet?– Alex Mamo
Mar 24 at 9:41