Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default Reusing Data Store used for showing map

    Reusing Data Store used for showing map


    Dear All,
    I have 2 google maps with same coordinates data.
    One is shown on tab panel and one is shown on a window (side by side).
    The store "geostore" is a json store and is loaded on tab panel ("afterrender event").
    Now I want to call the same store and show coordinates on window.
    But I am stuck how to procede this.
    Please shed some light on it.
    thanks

  2. #2
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    512
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    so you have two maps, one on a tab and other on a window. You want both maps to show the exact same data? If so, just populate your maps using the same store. I'm guessing we're not talking about the same thing... let me know.

    John

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default


    hi,
    I want to call the same store but I dont want to reload the store. so which method I need to see the data on the store (or model) I can't find proper solution. let me know if it is possible.
    thanks

  4. #4
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    512
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    If both of your maps show the same coordinates then why not use the same store? After the store is loaded the first time (map 1) , it doesn't need to be loaded again unless you want the stores data refreshed or you need to change the filter back on the server. You can re-use a store as many times as needed w/out ever reloading.

    If we're not talking about the same thing then please provide more detail regarding what data is shown on your maps.

    John

  5. #5
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default


    Thanks,
    I exactly want that but I dont know how to do that
    Can you share some codes
    thanks

  6. #6
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default


    My code is like this:
    On the main viewport afterrender event I am loading my store like this
    Code:
    var geoCoordinates=Ext.create('MyApp.store.coordinateStore',{});geoCordinates.load({
        scope: this,
        callback: function(records, operation, success) {........}})
    This is working absolutely fine

    but I don't know how to use MyApp.store.coordinateStore without reloading the data. Which method I need?

    Please help me through it.
    thanks

  7. #7
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    512
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    simply grab your store this way ....
    Code:
    var myStore = Ext.StoreManager.get('coordinateStore');
    the first time you load the store (in your code example) it contains data. Now all you do is grab a reference to that store. You can do anything store related to the myStore variable. Assign it to a list, loop over it ... whatever. The store is global to your application.

    The Sencha store docs have all the details

    Hope that helps
    John

  8. #8
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default


    Dear BostonMerlin,
    I already tried it. But chrome's developer tool is not showing any data. I am confused what wrong I am doing.
    I simply did something like.
    Code:
    var myStore = Ext.StoreManager.get('coordinateStore');//Var recd= myStore.getAt(0);
    
    console.log(recd);


    and the result is undefined. I cannot understand why.
    I have skimmed through the documentation too.
    Please help me out.
    thanks

  9. #9
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    512
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    It looks like you're creating the store on the fly which is ok if you never want to use it again but in your case you need to define this ahead of time. You should instead be following best practices by creating your stores and models up front and referencing them in your applications config. Once you do that, you'll be able to grab a reference to the store after the first call is made.

    Alternatively, once you've created your store (on the fly), pass that store variable to the function (or better yet, controller action) that will then use that store to update your second map. I would instead create your store up front then reference as needed but at least you know you have a few options.

    Your questions indicate you've not gone through the basics of building a touch application. You might want to work through the examples supplied by Sencha.

    Getting started:
    http://docs.sencha.com/touch/2-1/#!/guide


    Hope that helps
    John

  10. #10
    Sencha User
    Join Date
    May 2010
    Posts
    111
    Vote Rating
    1
    sajan is on a distinguished road

      0  

    Default


    Dear BostonMarlin,
    Thanks I think my problem is solved now.
    The store being local was the problem.
    Thank you

Thread Participants: 1