last day (15 days later) » 

7:16 PM
0
A: Cannot get map to display on meteor app using google map api3

Ethaanwich meteor version are you using? run meteor --version and if is under 1.0.4 change the rendered to this(rendered = function() was depurated), now we use onRendered . Template.maps.onRendered(function(){ //map code here }); Also you don't need the google.maps.event.addDomListene here, y...

 
Hey thanks for looking into it for me. My version is current 1.1.0.2. I am going to look into your demo and work on applying my map into it. I will keep you updated. Shouldn't take too long.
 
Template rendered should work instead,put a console.log inside the function initialize to be sure that the functions get initied
 
The console.log() is not being hit. Its not allowing it to be rendered. I am still getting this error "Uncaught TypeError: Cannot set property 'rendered' of undefined" and it is pointing to line 3 which is Template.maps.rendered = function() {
 
try with this html <body>{{> maps}}</body> put the template outside the body tag also like the answer says you can't use template.maps.rendered you should change to template.maps.onRendered() it never gonna works.
 
Hey thank you for sticking with me. When I change it to onRendered() I am getting left handed assignment error. If I use just onRendered the errors go away. Only issue is the initialize function is still not being ran. My console.log is not firing. I believe this may be due to the fact that there is no #map-canvas div to load map into possibly now. Here is my github with the code where it currently is at containing the changes you suggested - the onRendered() and + onRendered without the ().
 
7:16 PM
check answer update plx
 
I believe I implemented your changes correctly. There are now reflected in my github. It runs and there are no errors. A map is still not being displayed on either the web browser or when I am trying to launch it on android device emulator though it is just a blank page.
 
hellow
 
hey ethaan
thank you so much i hate bothering
you
how are you
 
fine
tired just go back from running on the park =p
did you have the css?
to show the map
ok i see the css
do me a favor use this
 
kk
?
 
7:23 PM
Template.maps.onRendered(function(){
Tracker.autorun(function(){
initMap();
})
})
and check
damn also this
initMap = function(){
var map;
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644)
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
}
brb 5min
try that
 
ok i am runnit it now
running*
alright nice so the map is now running and displaying in the web browser. It is still blank when I am running on the android device emulator
 
well thats because the css
you should place with the css
i was facing the same problem
 
put the css inside of the html page?
 
and ended up solving with this css
this css made tricek some times.
position: fixed !Important;
height: 100%;
overflow: hidden;
top: 44px;
left: 200px !important;
width: 100%;
bottom:0;
right:0;
try it
 
kk
should take 1 sek
 
7:34 PM
and it will be nice if you up vote/accept this answer
brb im making my food
right now haha
 
I will.
Should i place the css in my css file or directly into the html page?
I entered that css into the the maptest.css fist and it worked on web again but failed to display on the android device emulator. So i took it out of there and put it into a style tag inside of my html file and I have similar results. I am going to try and directly put it into the map-canvas div now using style="..."
dam so i had the same results all three places i placed the css they all worked on the web but on the emulator it is still only giving me a blank screen
 
7:53 PM
yes
put an alert
on the function
and check if you see it on the mobile
jusrt to be sure its a css problem
 
ok
both alert are firigin on the web i put inside the Tracker.autorun function and one inside the initMap function and neither are firing on the emulator
firing**
wait
oh my imma a fool
i uninstalled the app from the emulator
then re ran it because i was scared it was just keeping the old application
when i did this both alert fired but then about 10 error messages came up up
on the web both alerts are going off twice
i could provide you a stack trace if ud like if not thats fine no worries this is my problem and you offered more than enough help
 
8:09 PM
jajajaja
 
i know :(
 
what errors did you get?
 
its still workin on web emulator is still blank here is errors it is throwin at android pastebin.com/JfDeAWZW
 
use this script
<head>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
</head>
 
same results as before
 
8:14 PM
remove the tracker
keep just the rendered
 
ok
 
wich android version are you using on the emulator?
4.4 <?
 
not sure lemme check
4.4.2
 
ok so gmaps works weird
on android under 4.4
you remove the tracker/? and get the same error?
 
yes i took the Tracker out
I am still receiving what appears to be the same error's i am about to compare the to the old error old put now
yes so it still contains same 12 errors
 
8:24 PM
damn
you have more code to show me?
its so weird
 
yea ill put where i currently back on github
github.com/zzrot/map2 k its updated
 
To be honest it looks ok
so lets try this
initMap = function(){

var map;
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644)
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
Session.set('map',true) //add session
}
Template.maps.onRendered(function(){
Tracker.autorun(function(){
if(Session.get('map')){
initMap();
}
});
})
 
k 1 sek
 
try with that
 
alright
it is still throwing 12 errors back some are different i believe doing side by side comparison now
no they appear the same just in a different order
 
8:39 PM
hmm
its weird really
let me clone the project and work on it what you say?
right now i should go to my girlfriend house
 
if you would like to thats cool i definately dont expect you to as i will continute to try and get something running
continue**
 
i like to run and get into meteor issues
jaja
its nice for me
 
its nice of as you well
 
but i will continue it on the night right now i should work on some other stuff from my work
 
i wish i had enugh points to bounty the question so u could more from it
 
8:42 PM
naa don't worry its not neccesary
=D
 
cool i will be on and if i make any progress i will comment on the original post
thank you alot even if u dont have time to clone and what not you have been a great help i appreciate tons
gl on ur work man i wont keep you any long peace have a nice day
 
you too men cyaa
 

last day (15 days later) »