• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C from JavaScript, Google Map event listeners in a WebView.


  • Subject: Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • From: Pierre Bernard <email@hidden>
  • Date: Thu, 8 Feb 2007 17:53:08 +0100

Hi!

Did you ever get your Google Maps integration to work?

I am trying to do much the same. I want to display a WebView showing Google Maps. From that web view I want to be able to determine a location pointed out or flagged by the user.

Best,
Pierre


On 16 Jan 2006, at 18:13, Erik Sjödin wrote:

Hi!

I'm trying to execute a objective c method called "test" from a
JavaScript in a WebView. The code compiles fine but "test" is not
executed when the JavaScript is executed in the WebView.

I'm also trying to get google maps event listeners to work in my
WebView, I've tried both GEvent.addListener and GEvent.bind without
succes. My gmap loads fine in the WebView otherwise and the listeners
work in Safari...

Any Ideas?

----- objective c code:

- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *) frame {

id win = [webView windowScriptObject];

// alloc an instance of the mapManager class
MapManager *mapManager = [[MapManager alloc] init];

// publish mapManager to webView
[win setValue:mapManager forKey:@"gMapManager"];

}

------ javascript code:

<script type="text/javascript">

// exc. obj-c method
if (gMapManager) { gMapManager.test(); }

</script>

thanks! // erik
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

--- Pierre Bernard http://www.bernard-web.com/pierre http://www.houdah.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Showing more than one entity in a tableview (Core Data)
  • Next by Date: WWDC 2007
  • Previous by thread: Bindings: enabled
  • Next by thread: Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • Index(es):
    • Date
    • Thread