I know there are a couple of threads on this or a similar topic, but I can’t figure out what the problem is:
The ionic-starter-maps template does work fine.
However, if I change the structure that the map appears on a subpage/template within an ion-view, the map is not showing nor are there any errors.
My index.html looks like the following:
<body ng-app="MyApp"> <ion-nav-view></ion-nav-view> </body>
The certain template, what is loaded into this ion-nav-view looks like this:
<ion-view title="Map" style="background: transparent;"> <ion-nav-buttons side="left"> <button menu-toggle="left" class="button button-icon icon ion-navicon"></button> </ion-nav-buttons> <ion-nav-buttons side="right"> <button class="button button-icon icon ion-android-locate" ng-click="centerOnMe()"></button> </ion-nav-buttons> <ion-content class="has-header" scroll="false"> <map on-create="mapCreated(map)"></map> </ion-content> </ion-view>
As I said, it does work if I place the
<map>-Tag within index.html directly.
I tried changing the sizes and played around with the style attributes as well. Everything is fine there.