Steve Trefethen
Contact me
About Me View my LinkedIn profile

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

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.

Mashup of Google Maps and VCL

May 31 2007 7:53AM

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:

Tags:

Comments

5/31/2007 9:32:23 AM #

Gustavo Carreno

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

Gustavo Carreno

5/31/2007 1:09:48 PM #

C Johnson

Definitely.  Bring on the code!

C Johnson

5/31/2007 7:44:51 PM #

Ilse

asap?

Ilse

5/31/2007 8:12:27 PM #

<cough>
http://cc.codegear.com/add">http://cc.codegear.com/add
</cough>

David Clegg

6/4/2007 12:06:27 AM #

Steve Trefethen

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.

Steve Trefethen

6/4/2007 7:58:00 AM #

Gustavo Carreno

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

Gustavo Carreno

6/4/2007 3:06:43 PM #

Bud

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

Bud

6/4/2007 8:49:21 PM #

Bud

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

Bud

4/15/2008 2:30:25 AM #

Rodrigo Peplau

Hi, I'm working on a project in Brazil - Sailormade (www.sailormade.com.br). We built the front-end in Delphi, using TWebBrowser Component (www.cryer.co.uk/.../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

Rodrigo Peplau

4/15/2008 4:52:03 AM #

Steve Trefethen

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 www.alistapart.com/articles/takecontrolofyourmaps">this one. Btw, you can also find this link in my <a href="http://www.stevetrefethen.com/linkblog/>link blog</a>.

Good luck!

Steve Trefethen

5/17/2008 5:46:48 PM #

Alexandre

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.

Alexandre

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Spam filtering provided by: Spam Counter
340 comments approved, 1533 spam caught since October 28, 2009
Powered by Commentor