Steve Trefethen
Contact me Send mail to the author(s)
About Me View my LinkedIn profile

Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?

Archives
Statistics
Total Posts: 524
This Year: 26
This Month: 0
This Week: 1
Comments: 1835
Disclaimer
The posts on this weblog are provided �AS IS� with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer�s view in any way.
# Thursday, May 31, 2007
« Microsoft Surface looks very impressive | Main | Google Developer Day 2007 »

Mashup of Google Maps and VCL

Tagged: VCL

Tags:

In light of Google Developer Day, which I'll be attending tomorrow, I thought I'd be fun to post a teaser about a little VCL mashup I've been working on where I've created a descendant of TWebBrowser to render a Google map with two-way interaction between Javascript  and the VCL. The "trick", at least in this case, is using IDocHostUIHandler.GetExternal and connecting the ppDispatch parameter to a Pascal object from the VCL application which exposes application functionality to the Javascript running in the browser control. The screenshot is a standard VCL TForm application with two TButton's, one places a marker on the map at a particular longitude/latitude and the other pans the map to a specific lat/long. Once placed, clicking the marker causes the form's caption to update with text passed from the original button click. The Pascal code is particularly interesting to me because the concepts are very similar to code developed for the Zombie Test Automation framework used back in D3 days. Similar code is used in the IDE's welcome page to handle opening of projects from the browser control.

If there is interest I'll look to blog about this in more detail so let me know what you think.

Have you done any interesting VCL/web mashups?

Nitpicker's corner (with apologies to Raymond Chen for borrowing the name):
I understand this may not fit the classic definition of a "mashup" but it seemed fitting to me.

[UPDATE: April 2, 2008] Related links:

Comments [11] # permalink Posted @ 12:53AM
Thursday, May 31, 2007 2:32:23 AM (Pacific Daylight Time, UTC-07:00)
Hi Steve,

That looks quite interesting. Really interesting indeed !!!!

Could you be so kind to place the source online or mail me if there's a privacy issue ?

Cheers,
Gustavo Carreno
Thursday, May 31, 2007 6:09:48 AM (Pacific Daylight Time, UTC-07:00)
Definitely. Bring on the code!
C Johnson
Thursday, May 31, 2007 12:44:51 PM (Pacific Daylight Time, UTC-07:00)
asap?
Ilse
Thursday, May 31, 2007 1:12:27 PM (Pacific Daylight Time, UTC-07:00)
Sunday, June 03, 2007 5:06:27 PM (Pacific Daylight Time, UTC-07:00)
All,
Sorry, I've been out of town for the last few and haven't been able to respond. The code I've been working on isn't ready for public consumption and I'm still playing with a few different approaches regarding VCL mashups. I would be interested in hearing from anyone who is or has tried something similar as it seems there could be some real value added. Of course, this concept isn't unique to Delphi so even if you've done MFC or WinForms or something else I'd be interested.
Monday, June 04, 2007 12:58:00 AM (Pacific Daylight Time, UTC-07:00)
Hi Steve,

Ok, you're excused this time, but just because you're a nice guy !!

We'll wait patiently for you to mature your code and make it public ready.

Cheers,
Gustavo Carreno
Monday, June 04, 2007 8:06:43 AM (Pacific Daylight Time, UTC-07:00)
Everybody is doing mashups with Google Map and Virtual Earth now. Pulling business data from enterprise database is more interesting and more lucrative than mapping your own house. Oracle has spatial data types (SDO), and if you could pull the data out of Oracle SDO and push them to Google Map and Virtual Earth, that would be more interesting.

Regards,
Bud
Monday, June 04, 2007 1:49:21 PM (Pacific Daylight Time, UTC-07:00)
My previous comment may sound arrogant, so please allow me to clarify a little.

It would be cool to make your VCL database aware, allowing Lat, Lon fields to be set. Developers can worry about what back end database to use.

Regards,
Bud
Monday, April 14, 2008 7:30:25 PM (Pacific Daylight Time, UTC-07:00)
Hi, I'm working on a project in Brazil - Sailormade (www.sailormade.com.br). We built the front-end in Delphi, using TWebBrowser Component (http://www.cryer.co.uk/brian/delphi/twebbrowser/twebbrowser_properties.htm). This is a wrapper for the Internet Explorer installed on host computer.

The integration with Google Maps is done by the use of Javascript and are only possible if there's some kind of Internet connecton.

Is there someone able to use bitmaps on cache when offline? I guess you have to cheat on Google... They already mentioned this is not possible.

Like to hear from you guys any more info about this subject.

[]'s
Monday, April 14, 2008 9:52:03 PM (Pacific Daylight Time, UTC-07:00)
Hi Rodrigo,
As you know Google maps isn't intended to be used offline. That said there are other mapping projects you may find useful like this one. Btw, you can also find this link in my <a href="http://www.stevetrefethen.com/linkblog/>link blog</a>.

Good luck!
Saturday, May 17, 2008 10:46:48 AM (Pacific Daylight Time, UTC-07:00)
Hi Steve, can you send me the full source code of the Article, I read, understand the most of part, but I don't understand how to create wrapper class.. can you give me the source..

Thanks.
Comments are closed.