hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Opening a new View or window on top of the window #90

Closed kid-yume closed 7 years ago

kid-yume commented 7 years ago

What if i want to open a window over top of the map. i am unable to add a window to the screen or anything

yozef commented 7 years ago

I don't think anything would prevent from doing that. You're issue is not in the module.

kid-yume commented 7 years ago

Im not saying its the module per say maybe its the way the module works and interacts with windows. For example I cannot add the map to a view. It can only be added to a window. When i add it to a view it does not work. If i add a secondary window in the app.js it will not work. however, if i fire an app event inside the postlayout listener the window opens with no issues. If i try to add any "views" to that window it will not work. I did not start having these kind of issues until i added the module. Does that make sense?

kid-yume commented 7 years ago

/*

// This is a single context application with multiple windows in a stack (function() { //render appropriate components based on the platform and form factor var osname = Ti.Platform.osname, version = Ti.Platform.version, height = Ti.Platform.displayCaps.platformHeight, width = Ti.Platform.displayCaps.platformWidth;

//considering tablets to have width over 720px and height over 600px - you can define your own function checkTablet() { var platform = Ti.Platform.osname;

switch (platform) {
  case 'ipad':
    return true;
  case 'android':
    var psc = Ti.Platform.Android.physicalSizeCategory;
    var tiAndroid = Ti.Platform.Android;
    return psc === tiAndroid.PHYSICAL_SIZE_CATEGORY_LARGE || psc === tiAndroid.PHYSICAL_SIZE_CATEGORY_XLARGE;
  default:
    return Math.min(
      Ti.Platform.displayCaps.platformHeight,
      Ti.Platform.displayCaps.platformWidth
    ) >= 400
}

}

var isTablet = checkTablet(); console.log(isTablet);

var Window,Window2; if (isTablet) { Window = require('ui/tablet/ApplicationWindow'); } else { // Android uses platform-specific properties to create windows. // All other platforms follow a similar UI pattern. if (osname === 'android') { Window = require('ui/handheld/android/ApplicationWindow'); } else { Window = require('ui/handheld/ApplicationWindow'); } }

Window2 = require('ui/handheld/TableViewWindow');

new Window().open(); // new Window2().open(); Will not work this way

Ti.App.addEventListener('done',function(e){ Ti.API.info(e); new Window2().open(); // now will open howver now views show inside.

});

})();

kid-yume commented 7 years ago

I mean "no views will show inside the 2nd window now."

kid-yume commented 7 years ago

Nevermind. Weirdest thing started a whole new project and it started working again!