doufu6423 2013-01-25 21:49
浏览 29
已采纳

Fusion Tables API:如何通过Ruby,JavaScript或其他语言发出PUT请求来更新样式?

I was looking at this Fusion Tables API page on how to update a Fusion Table's style settings via the Fusion Tables API.

Apparently, you must make a PUT request in order to update the Fusion Table's style.

I was wondering: How do I do that in Ruby or JavaScript? And is it possible to do it in other popular languages (e.g., pHp, Python)?

  • 写回答

2条回答 默认 最新

  • douzi9211 2013-01-25 23:33
    关注

    In Python you can easily perform a PUT HTTP request using the Requests module.

    import requests
    
    key = u'your_api_key'
    url = u'https://www.googleapis.com/fusiontables/v1/tables/tableId/styles/styleId?key=%s' % key
    
    body = dict()
    body[u'markerOptions.iconName'] = u'geographic_features'
    # put other settings here
    
    r = request.put(url, data=body)
    

    Requests documentation can be found here : http://docs.python-requests.org/en/latest/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上