MapKit for Cappuccino

Posted on 15 September 2009 by Johannes Fahrenkrug. Tags: Programming Cappuccino Cocoa

A very nice individual by the name of Ratty has done some work integrating GoogleMaps with the fantastic Cappuccino framework. I have used it in a project of mine but found out that some things don't work right, especially draggable GoogleMaps markers. So I forked the MapKit project and have basically gutted and re-wired it.
Now it is not div-based anymore but renders the GoogleMap in an iFrame using CPWebView. This works much better. Check out the Readme on the github page to see how you can add spiffy GoogleMaps to your Cappuccino project!
The code will also help you if you have issues with resizing CPWebViews since that was an issue I also had to solve.

Comments

Johannes Fahrenkrug said...

Hi Mic,

it's fixed now! If you clone the repo again, everything should work. Thanks again for pointing this out!

- Johannes

September 17, 2009 05:55 AM

Johannes Fahrenkrug said...

Hi Mic,

absolutely my fault! I'll fix this tomorrow and then post a comment here. Thanks for pointing out my lack of git-fu ;)

- Johannes

September 16, 2009 08:02 PM

Mic Pringle said...

Hi Johannes

It seems as though the Locations project doesn't include the MapKit framework in the repository either, so I did an extra clone of just that and then copied it into the project folder. This now loads fine :-)

However, whenever I click on either of the two locations on the left, the error console reports

'ReferenceError: Can't find variable: GLatLng'

Which I think may have something to do with the gmNamespace but I'm not sure. Any ideas?

Thanks

-Mic

September 16, 2009 07:32 PM

Mic Pringle said...

Hi Johannes

I think I may have figured out whats gone wrong here.

Instead of cloning the git repo for the Locations project, I just downloaded the tar file from the github page.

When I've inspected it, is seems that it doesn't include the mapkit framework, just an empty file named mapkit.

I'm going to try cloning the repo via git now I've got it installed to see if that make a difference, but github is down at the moment so I'll have to wait until it's back up.

Will let you know how I get on.

Thanks

-Mic

September 16, 2009 07:14 PM

Johannes Fahrenkrug said...

Hi Mic,

Thanks for your nice words.
Did you load the Locations project with the Webkit console or Firebug open? That will most likely give you/us some clues.

- Johannes

September 16, 2009 05:19 AM

Mic Pringle said...

Hi Johannes

Great work on this framework.

One thing though, I can't get the more substantial CappuccinoLocations example to work. The page never seems to finish loading. Any ideas ?

The 'Hello World' example works fine.

Thanks

-Mic

September 15, 2009 07:42 PM

Comments

Please keep it clean, everybody. Comments with profanity will be deleted.

blog comments powered by Disqus