Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » Extending the Google Map widget
Extending the Google Map widget [message #975505] Wed, 07 November 2012 23:09
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
I've just revisited the Google Maps widget that's included with the downloadable mortgage calculator project, found on the EDT downloads page.

With the application I had in mind I wanted to plot multiple markers on a map and then have the map automatically centre itself on those markers.

I couldn't see a way to do that with the supplied widget so I started googling to see how this could be done. It didn't take long to find an example of this in javascript that worked with the Google Maps v3 API so I've extended the Google Maps widget to include a new autoCenter() function.

I changed the EGLSource/utils/map/GoogleMap.egl external type to include a reference to the new function and modified the Webcontent/utils/maps/GoogleMap.js to include the new function.

The attached project includes the extended widget plus a sample EGL handler that demonstrates the new feature. The sample adds four markers (four IBM UK offices) to the map and by default the map is positioned to the last marker that was added. There's an 'Auto Center' button that when clicked executes the new autoCenter() function.

  • Attachment:
    (Size: 33.89KB, Downloaded 393 times)
Previous Topic:Service Call Syntax
Next Topic:Switching to another DojoMobileView
Goto Forum:

Current Time: Wed Oct 21 14:45:32 GMT 2020

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

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

Back to the top