• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

a14n/dart-google-maps: A library to use Google Maps JavaScript API v3 from Dart ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

a14n/dart-google-maps

开源软件地址(OpenSource Url):

https://github.com/a14n/dart-google-maps

开源编程语言(OpenSource Language):

HTML 53.5%

开源软件介绍(OpenSource Introduction):

Dart Google Maps

This project is a library to use Google Maps JavaScript API v3 from dart scripts.

Usage

To use this library in your code:

  • add a dependency in your pubspec.yaml :

    dependencies:
      google_maps:
  • add import in your dart code:

    import 'package:google_maps/google_maps.dart';
  • Include the Maps API JavaScript using a script tag before your dart script.

    <script src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script>

Please see the Google Maps JavaScript API v3 Getting Started guide for information about obtaining an API Key.

A very simple example :

import 'dart:html';

import 'package:google_maps/google_maps.dart';

void main() {
  final mapOptions = MapOptions()
    ..zoom = 8
    ..center = LatLng(-34.397, 150.644);
  GMap(document.getElementById("map-canvas"), mapOptions);
}

Coverage

The library covers all Google Maps JavaScript API v3 and its Libraries. To use one or more Google Maps Library:

  • add import in your dart code:

    import 'package:google_maps/google_maps_LIBRARY1.dart';
    import 'package:google_maps/google_maps_LIBRARY2.dart';
  • Include the Maps API JavaScript using a script tag.

    <script src="http://maps.googleapis.com/maps/api/js?libraries=LIBRARY1,LIBRARY2"></script>

Examples

Examples found at https://google-developers.appspot.com/maps/documentation/javascript/examples/ are available in a dart version at https://github.com/a14n/dart-google-maps in the example directory.

License

Apache 2.0




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
stanaka/lightroom-google-photo-plugin发布时间:2022-06-12
下一篇:
bazrafkan/google_place: A new Flutter package for handle google place api发布时间:2022-06-12
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap