Google maps and knockoutjs

前端 未结 4 1663
攒了一身酷
攒了一身酷 2021-02-02 03:43

I am making a single page app where in the second view I need to display the Google map. I am using the Google maps API where the map object is to be created.

          


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 03:50

    Instead of mapId you'll want to use document.getElementById('map'), where 'map' is the id of the div containing the map (

    ). This jsFiddle should help.

提交回复
热议问题