This is a migrated thread and some comments may be shown as answers.

Change tooltip.content

2 Answers 213 Views
Map
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Andrei asked on 05 Sep 2014, 10:56 AM
I select marker with content "new marker ".  Using event

$scope.onShow = function (e) {
         $scope.selectMarker = e.sender.marker;
         $scope.markerText = e.sender.marker.options.tooltip.content;
}

then I updated markerText to "Update marker" and click  to update

$scope.onUpdateMarker = function () {
                if ($scope.selectMarker) {
                    $scope.selectMarker.options.tooltip.content = $scope.markerText;
                    $scope.selectMarker.tooltip.options.content = $scope.markerText;
            }
};

On the map I see old marker content "new marker ".  How change content on map ?

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 09 Sep 2014, 07:47 AM
Hello,

If I understand correctly, you'd like to change the tooltip content after showing the marker.
This is possible by calling the refresh() method on the tooltip after setting its content:
$scope.selectMarker.tooltip.options.content = $scope.markerText;
$scope.selectMarker.tooltip.refresh();


-- Live demo --

I hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Andrei
Top achievements
Rank 1
answered on 10 Sep 2014, 07:54 AM
Thank you. It's work.
Tags
Map
Asked by
Andrei
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Andrei
Top achievements
Rank 1
Share this question
or