Julio Marins
Julio Marins

Reputation: 10639

How to keep the google map markers after I change from one view to another on Ionic?

How to keep the google map markers after I change from one view to another on Ionic? After I change from one view to another all the markers are gone, and the map stays clean.

I'm using Ionic framework and I have a google map div:

<ion-view view-title="{{navTitle}}">
  <ion-content>
    <div class="map-container">
        <div id="map"></div>
    </div>
    <div class="control-panel">
        <a class="button multi-line" ng-href="#/app/search" target="_self" href="#/app/search">
            <span>PESQUISAR</span>
            <span>VIAGEM</span>
        </a>
        <a class="button multi-line" ng-href="#/app/browse" target="_self" href="#/app/browse">
            <span>VER TODAS</span>
            <span>AS LINHAS</span>
        </a>
    </div>
  </ion-content>
</ion-view>

Upvotes: 0

Views: 95

Answers (1)

Julio Marins
Julio Marins

Reputation: 10639

The problem was that i was overwriting the map object with another one. It wasn't a ionic thing at all

Upvotes: 1

Related Questions