首先,我想说我不太熟悉Google Maps Javascript API v3(我过去3天的唯一体验).我已设法显示带有标记列表的地图并使用它们连接DirectionsService,但有时我的列表非常大,我收到以下错误:
Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
// List of all locations for device
var locations = [];
// example: locations = [
// {datetime: '2014/09/28 20:20', location: '41.99999 21.99999 30.0'},
// ... {...} ... may be more than 200 entries for locations
// {datetime: '2014/09/28 20:25', location: '41.99999 21.99999 30.0'}
// ]
var map;
var markers = [];
var bounds …Run Code Online (Sandbox Code Playgroud)