You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ui-gmap-marker directive represents a marker inside the map. We use the following attributes:
42
42
43
-
* coords - where is the scope the marker location will be binded to.
43
+
* coords - where is the scope the marker location will be bound to.
44
44
* options - object that holds the marker options. We are going to use the draggable option.
45
45
* events - handling the events on the marker. We will use the click event.
46
46
* idKey - where in the scope there exists the unique id of the object that the marker represent.
@@ -56,7 +56,7 @@ What happened here:
56
56
* We added the click event to the map. Every time the user clicks the map, we take the location from the click event's params and save it as the party's new location.
57
57
Notice that in the end we call $scope.$apply(); this is because that event comes outside of Angular and we need to let Angular know that something has change so it will run another $digest cycle.
58
58
* We defined the options object under the marker to specify the marker is draggable.
59
-
* We handled the dragend event that happens when the marker is droped in a new location. We take the location from the event's params and save it as the party's new location.
59
+
* We handled the dragend event that happens when the marker is dropped to a new location. We take the location from the event's params and save it as the party's new location.
60
60
61
61
Again, with the great Meteor platform there is no need for sync or save function. We just set it and it syncs in all other clients.
62
62
@@ -77,7 +77,7 @@ You can see that the difference between the directive we used in `party-details.
77
77
The attributes we use:
78
78
79
79
* models - the scope array that the markers represent.
80
-
* coords - the property the holds the location.
80
+
* coords - the property that holds the location.
81
81
* click - handler for the click event on a marker
82
82
* fit - a boolean to automatically zoom the map to fit all the markers inside
83
83
* idKey - the property that holds the unique id of the array
0 commit comments