Hello,
I just tried to use Polymer google map and add google map markers yelding it directly to HTML and update on mouseup after moving.
In element inspector you can see all these markers as elements.
Or add/remove from console, MapMarker collection
Have fun!
<template name="mapMarkers">
{{#each mapMarker}}
<google-map-marker id={{_id}} latitude={{latitude}} longitude={{longitude}} title={{title}} draggable={{draggable}} mouseEvents="true">
</google-map-marker>
{{/each}}
</template>
Template.mapMarkers.events({
"google-map-marker-mouseup google-map-marker": _.debounce(function(event,template) {
//MapMarker
MapMarker.update({_id: event.currentTarget.id},{
latitude: event.target.latitude,
longitude: event.target.longitude,
title: event.target.title,
draggable: event.target.draggable
});
console.log(event.target.latitude);
console.log(event.target.longitude);
},50)
});