【发布时间】:2013-09-03 14:00:50
【问题描述】:
我刚刚开始使用 WebSharper,并且正在尝试使用 Google Maps API 做一些事情。我一直在尝试从下面实现示例代码: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)
但我找不到 OnAfterRender 方法所在的位置。我相信我已经打开了所有必需的命名空间,但没有提及它。
第二个问题,是否有最好的数据库与 WebSharper 应用程序一起使用,还是没有区别? Appharbor 让我可以选择:RavenDB、Microsoft SQL Server、MySQL、ElephantSQL、JustOneBD 和 MongoDB。我的数据库经验很少,我只需要一个非常简单的平面文件数据库。
【问题讨论】:
标签: f# websharper