Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » Switching to another DojoMobileView
Switching to another DojoMobileView [message #976899] Thu, 08 November 2012 23:17 Go to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
I've started incorporating the google map widget into a mobile application and I've run in to a slight problem.

It's currently a simple application with two views.

The first view shows a list of delivery addresses and the second view shows a map with the delivery addresses as markers. The two views are instantiated all within a single handler with the first view (the list) being shown on start. I have a DojoMobileToolBarButton on the toolbar of the first view to switch to the second view.

The google map is instantiated with the first view being active and this seems to cause the problem. The map seems to be positioned as though it were outside of the viewable map widget, I appear to be only seeing the edges of the map area. Sorry, it's not easy to explain.

I've added a button to the second view to execute the refresh() function on my google map and once pressed all is well with the world and my map is working as I expect. If I make my second view the view shown on start then again, all is good. I only get the problem if the map is instantiated whilst not being shown. I think.

Is it possible to trigger (and capture) an event of some kind when I switch views using a DojoMobileToolBarButton button? That way I could execute the refresh() function on the google map automatically.

Richard
Re: Switching to another DojoMobileView [message #978914 is a reply to message #976899] Sat, 10 November 2012 12:48 Go to previous message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
OK, I've solved my own problem. Sometimes the obvious alludes me.

I simply catch the onClick event for my DojoMobileToolBarButton, which switches to my second view (the google map view), and my onClick event performs a refresh (and autoCenter) on the map and it appears to be working well.

Richard

Previous Topic:Extending the Google Map widget
Next Topic:Search engine impact of web 2.0
Goto Forum:
  


Current Time: Wed Oct 09 00:58:58 GMT 2024

Powered by FUDForum. Page generated in 0.03426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top