Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't first make bindLabel and then add Marker to Map #355

Closed
sonic16x opened this issue May 27, 2016 · 1 comment
Closed

I can't first make bindLabel and then add Marker to Map #355

sonic16x opened this issue May 27, 2016 · 1 comment
Labels

Comments

@sonic16x
Copy link
Contributor

<!DOCTYPE html>
<html>
<head>
    <meta charset=utf-8 />
    <title>API карт 2ГИС</title>
    <script src="http://maps.api.2gis.ru/2.0/loader.js?pkg=full"></script>
    <script type="text/javascript">
        var map;

        DG.then(function () {
            map = DG.map('map', {
                center: [54.98, 82.89],
                zoom: 13
            });


            var dgElement = DG.marker([54.98, 82.89]);
            dgElement.bindLabel('Вы кликнули по мне!', {'static' : true});
            map.addLayer(dgElement);

        });
    </script>
</head>
<body>
<div id="map" style="width:500px; height:400px"></div>
</body>
</html>

Вот, будет ошибка. Причём если сначала добавить маркер на карту, а потом забиндить лейбл, то всё будет хорошо. Повторяется только для статического лейбла. Если static: false то будет работать и так.

@sonic16x sonic16x added the bug label May 27, 2016
@sonic16x sonic16x changed the title Не получается сначала сделать bindLabel а потом добавить маркер на карту. I can't first make bindLabel and then add Marker to Map May 27, 2016
@sonic16x sonic16x changed the title I can't first make bindLabel and then add Marker to Map I can't first make bindLabel and then add Marker to Map May 27, 2016
@sonic16x sonic16x reopened this May 27, 2016
@sonic16x
Copy link
Contributor Author

Duplicate #332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant