Friday, 19 April 2013

Embed Google maps in a form

I had to prove a concept the other day to embed google maps in a form. A big of googling Smile and some ideas that had to mash up.

Create a form with an ActiveX control “Microsoft Web Browser”.


On the init method after super call. Add this line.

ctrlactiveX.Navigate(' St Georges Terrace, PERTH WA 6000+(This is a random place)&output=embed');

Final result looks like this.


Thanks to this blog.

Minor change I had to make was to figure out the URL parameters. By passing the output=embed, you get a pretty good result.

No comments: