Tab with Map intergration


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% }


I have te same problem,

I use this:
but in tab not load
Can someone lend a hand?



It works thanks a lot =)
But the markers not work :frowning:


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.


I added this to the tab page when it loads

  <html ng-app="starter">
<title>Tabs Example</title>

<link href="" rel="stylesheet">
<link href=',400italic,600italic,700italic,800italic,400,800,600,300,700'
      rel='stylesheet' type='text/css'>
<script src=""></script>
<script src=",visualization&sensor=false&language=en&v=3.14"></script>
<script src="//"></script>
<script src=""></script>


Use this exemple contain two tab, but only tab 2 containing the map:


I think my app.js file is the reason why the map is not rendering on the page.
In the example angular.module is:

angular.module('ionicApp', ['ionic','google-maps'])

my angular.modue is

angular.module('starter', ['ionic', 'starter.controllers', ''])

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 aaron​ksaunders.
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.


Is it there but just not visible? Ie. if you set the Height to 200px can you see it?


Lack of support on this forum…