Skip to content

Instantly share code, notes, and snippets.

@nicobytes
Created September 12, 2017 18:08
Show Gist options
  • Select an option

  • Save nicobytes/ee5eabf0876a3dd348f7c72f50afa367 to your computer and use it in GitHub Desktop.

Select an option

Save nicobytes/ee5eabf0876a3dd348f7c72f50afa367 to your computer and use it in GitHub Desktop.
private generateMarkers(latitude:number, longitude: number, limit: number){
let markers: any[] = [];
for(let i =0;i<limit;i++){
markers.push({
title: 'hola ' + i,
position: {
lat: latitude + Math.random() * (1 - (-1)) + (-1),
lng: longitude + Math.random() * (1 - (-1)) + (-1)
}
});
}
return markers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment