Skip to content

Commit

Permalink
zone experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
webprofusion-chrisc committed Jun 20, 2016
1 parent e129eed commit ebbb0b8
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions App/Ionic2/ocm-app/app/pages/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,30 +320,34 @@ export class SearchPage extends Base implements OnInit {

this.log("Viewing/fetching POI Details " + args.poiId);
this.searchOnDemand = false; //suspend searches
this.zone.run(() => {
this.poiManager.getPOIById(args.poiId, true).subscribe(poi => {

this.log("Got POI Details " + poi.ID);
let poiDetailsModal = Modal.create(POIDetailsPage, { item: poi });

poiDetailsModal.onDismiss(() => {
//should focus map again..
this.log("Dismissing POI Details.");
this.mapping.focusMap();
this.searchOnDemand = true;
});
this.mapping.unfocusMap();
this.poiManager.getPOIById(args.poiId, true).subscribe(poi => {

this.nav.present(poiDetailsModal);
this.log("Got POI Details " + poi.ID);
let poiDetailsModal = Modal.create(POIDetailsPage, { item: poi });

}, (err) => {
poiDetailsModal.onDismiss(() => {
//should focus map again..
this.log("Dismissing POI Details.");
this.mapping.focusMap();
this.searchOnDemand = true;
});
this.mapping.unfocusMap();

this.appManager.showToastNotification(this.nav, "POI Details not available");
this.zone.run(() => {
this.nav.present(poiDetailsModal);
});


}, (err) => {

this.appManager.showToastNotification(this.nav, "POI Details not available");
});




/*
if (args.poi != null) {
this.log("Viewing POI Details " + args.poi.ID);
Expand Down

0 comments on commit ebbb0b8

Please sign in to comment.