Hi I have been trying to get a map loaded on a tab for awhile. I have looked at some of the examples but none of them have an example of a map on a tab. The map code works when placed into a simple html file and loaded. But when the same code is placed on the tab it will not show the map. I started with the tabs sample application and just copied in a map example from a website. I think the issue might be that the tab is a view and it needs some type of container for the html code. But I am not exactly sure I am a newbie at this.
I have the complete source code below. I removed my google key from the script that is the only change to the code below.
`
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 100% }
Did you start off with the default tab example application? I am trying to put the changes into that application. I only need one tab in my case. Does the JS need to be in the controllers.js? I am sorry I am new to this coding.
When I change it to the example it won’t compile. I am trying to modify one page of the tabs example to include the one map. I am sure I am doing something wrong with the app.js file. I copied the css file exactly. I replaced the tab-dash file from the tabs example with the code from code pin. I then modified it to change the names of the tab. I just made it “dash” where it used to say “about”
I was with some similar problems, I still studying all this framework together with Angular JS, I’m still beginner.
As I was starting my project, I decided to use the entire code of the example of aaronksaunders.
and it is running, and my JS is the same as example, with a single JS content of app.js and controllers.js.
Advise you you to do the same or studying for a time Angle JS
Thanks for your help. I took your advice and just used the code from the example. It worked in the chrome browser but it didn’t work on the phone. Were you able to get the code to work on the phone? The map doesn’t render on the phone. But the application does come up.