在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):eschwartz/backbone.googlemaps开源软件地址(OpenSource Url):https://github.com/eschwartz/backbone.googlemaps开源编程语言(OpenSource Language):JavaScript 92.7%开源软件介绍(OpenSource Introduction):Backbone.GoogleMapsA Backbone JS extension for interacting with the Google Maps API (v3.10) A note regarding the future of Backbone.GoogleMapsI am currently working on a library called Aeris.js which may serve as a replacement for Backbone.GoogleMaps. The original intent of Aeris.js was to render weather data, but along the way I had to create a set of abstractions for rendering large amounts of data from various APIs onto maps. The library is much cleaner than Backbone.GoogleMaps, and it's fully tested. I'm also paid to work on it, which means I have more time to support it :) I put together a jsfiddle which shows how you can bind a Backbone.Collection to a collection of markers. That's really just the tip of the iceberg when it comes to Aeris.js functionality (see the github page for docs and demos): Aeris.js also supports:
I am glad so many people have found the Backbone.GoogleMaps library useful. To make Aeris.js more accessible outside of weather applications, I would love to split up the basic mapping functionality into its own repo. If you'd like to give me a hand with this, send me a message and we can put together a game plan. You can find my contact info in my user profile About backbone.googlemapsBackbone.GoogleMaps is a simple Backbone JS extension for simplified interactions with the Google Maps API. The motivation for creating this extension was to have an easy way to sync data about maps locations from a database with the Google Maps UI, using Backbone's RESTful interface. ExampleView the files in the example directory for working samples. Don't forget to add your Google Maps API key:
A simple example: // Create Google map instance
var places = new Backbone.GoogleMaps.LocationCollection([
{
title: "Walker Art Center",
lat: 44.9796635,
lng: -93.2748776
},
{
title: "Science Museum of Minnesota",
lat: 44.9429618,
lng: -93.0981016
}
]);
var map = new google.maps.Map($('#map_canvas')[0], {
center: new google.maps.LatLng(44.9796635, -93.2748776),
zoom: 12,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
// Render Markers
var markerCollectionView = new Backbone.GoogleMaps.MarkerCollectionView({
collection: places,
map: map
});
markerCollectionView.render(); Backbone.GoogleMaps ComponentsBackbone.GoogleMaps is packaged with several customizable components. GoogleMaps.LocationRepresents a lat/lng location on a map. Extends Backbone.Model. Properties
Methods
GoogleMaps.LocationCollectionA collection of GoogleMaps.Location objects. Extends Backbone.Collection. Only a single GoogleMaps.MapViewA generic GoogleMaps view, for controlling a maps overlay instance. Extends Backbone.View. Properties
Methods
GoogleMaps.InfoWindowView controller for a google.maps.InfoWindow overlay instance. Extends Properties
Methods
GoogleMaps.MarkerViewView controller for a marker overlay. Extends Properties
Methods
GoogleMaps.MarkerCollectionViewView controller for a collection of Properties
Methods
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论