I've just started using WebSharper, and I'm trying to do something with the Google Maps API. I have been trying to implement the sample code from below: https://github.com/intellifactory/WebSharper.Google.Maps
open IntelliFactory.WebSharper.Google
[<JavaScript>]
let Sample buildMap =
Div [Attr.Style "padding-bottom:20px; width:500px; height:300px;"]
|>! OnAfterRender (fun mapElement ->
let center = new Maps.LatLng(37.4419, -122.1419)
let options = new Maps.MapOptions(center, MapTypeId.ROADMAP, 8)
let map = new Maps.Map(mapElement.Dom, options)
buildMap map)
But I can't find where the OnAfterRender method lives. I believe I've opened all the required namespaces, but there is no mention of it.
A cheap second question, is there a best database to use with WebSharper apps, or does it make no difference? Appharbor gives me the choice of: RavenDB, Microsoft SQL Server, MySQL, ElephantSQL, JustOneBD and MongoDB. I've got very little db experience, and I only need a very simple flatfile db.