Change tooltip.content

3 posts, 0 answers
  1. Andrei
    Andrei avatar
    5 posts
    Member since:
    Aug 2014

    Posted 05 Sep 2014 Link to this post

    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. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 09 Sep 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Andrei
    Andrei avatar
    5 posts
    Member since:
    Aug 2014

    Posted 10 Sep 2014 in reply to T. Tsonev Link to this post

    Thank you. It's work.
Back to Top