Gmaps4rails doesn't display my marker until reload - gmaps4rails

I implemented a Gmaps4Rails Map in my app:
Link to one Location, you may go back to the list with the link at the bottom and check another location ---http://immosmap.herokuapp.com/locations/37
My problem ist that I get this error and it only displays a blue map:
Uncaught TypeError: Object # has no method 'setMap'
But when I reload, it does display the way I want it to work.
Do I have to implement a callback here? How? Didn't find my topic in the wiki...

Related

Aurelia: Show Dialog State In URL

I have a simple Aurelia application that displays accounts. The default view is a list of accounts. There's also an account details view.
I'd to make the details view open in a modal/dialog over the top of the list view. However, I want the presence of the modal to show up as part of the URL.
I found it easy to use the aurelia-dialog plugin to display the details view, but can't figure out how to get the dialog's presence to show up in the URL.
Another option might be to throw out aurelia-dialog and use a child router to display the details view, then figure out how to make that show and hide as a modal.
And, of course, another possibility is that there's a better way that I just don't see yet.
Has anybody seen or created something like this?
One possibility that occurs to me would be to add the dialog's presence as a parameter to the current route and then call it. You could use the route like /account?dialog=true. Run some tests to ensure that the ?dialog=true still routes to the same page. Then, use that route to check whether that parameter is set and display or hide the dialog window. When you refresh the page, the dialog window should still be open/closed. This also means that whenever you open or close the dialog window, you need to send a new route to the router (basically same route but different parameter).
This isn't a detailed solution but might get you on the right path.

NavigateTo same page again does not refresh?

I have 2 pages in my Windows Phone 8 XAML app, "MainPage" and "Play".
I NavigateTo Play from MainPage, then hit the back button to return to MainPage.
Once I NavigateTo Play again, 2 things happen that I find confusing:
My constructor for Play is called again, yet the controls on the page still contain data from the last page visit.
Even though I see data in page members the data does not render on the screen.
There's something basic here I'm missing? How do I either get a completely new page; or re-render the previous instance?
Thanks
-John
You can use different class to hold your data, I think that is the problem. You can see this for more info.

Error When Source Artribute is Used in Frame Tag

I am trying to open a webpage in Windows 8 XAML with the following Frame Tag.
<Frame
Source="http://medievaltvg.freeoda.com/"
/>
I get the following error from Visual Studio:
Unknown member 'Source' on element 'Frame.'
The compiler tells you, that there is no member Source on the Frame-control.
This is not what Windows.UI.Xaml.Frame is intended for.
From MSDN.
You use the Frame control to support navigation to Page controls. You create
as many different pages as needed to present the content in your application
and then navigate to those pages from the frame. To navigate from the frame,
you call the Navigate method and pass in the type of the page to navigate to.
You can also pass in a parameter object to initialize the page to a particular state.
What you are looking for is the WebView-Control.

determine google maps marker display status

Straight from the google reference material on their API
Hiding a set of map markers previously plotted to hide
mapArray[i].setMap(null);
Simple.
However is there anything that will allow me to asses the display status of a marker thus allowing me to simply toggle the display status?
I've been googling it and searching their api refs but cannot see anything.
Try google.maps.Marker.getMap().

Sencha Touch: How to read certain record from the store?

I have an application that has 3 level of data depth:
list of presentations
presentation detail
presentation slides
Right now when user came to the app he's presented with list loaded from JSONP store. He click on one item and the callback function receives the record. It pushes it into new view - the detail and displays it. User can disclose presentation slides from there - data record is passed from detail again.
Problem is when user refreshes the page or came from URL. If he came to url like /presentations/slides/1, he wants to see the slides for presentation id:1. Problem is that as long as he wasn't at the list, data was not loaded and because it was not loaded, it was not passed to the detail and the detail didn't pass it along to the slides view. So I have no data.
But I still have the ID! Comming from the PHP's Zend Framework, I would call something like: this.store.find(1), but I can't find any way to do this.
How do I load something from the store based on it's record.data.id?
To add more, store.load() seems to work asyncronously, so when I do:
store.load();
store.each(function(rec){console.log(rec);});
It wouldn't work with JSONP store, because the data is not loaded yet. But when I use Chrome Debuger and pause the execution to let the data load, it works :(
You are correct the load is asyncronously so all you have to do is use the callback function of the store. You can find an example here How to get data from extjs 4 store