As shown in this example using the api ngmap direction, the map variable is used to get the total length of the route.
{{map.directionsRenderers[0].directions.routes[0].overview_path.length}}
as in the example below.
view-source: https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/directions.html
But I want this variable inside my controller because I want to create my own direction panel
I tried using $scope.mapin the controller, but it does not work.
$scope.map
Please, help.
In your controller, you want to initialize the map object as follows:
$scope.$on('mapInitialized', function(event, map) { map.setOptions({ }); });
, , init, side map.setOptions.
Source: https://habr.com/ru/post/1614683/More articles:Limit Android user location in city perimeters - androidAny idea on these extra tables in my development scheme? - sqlRemote binding MediaServer Camera object died - only on KITKAT - androidPassing in a Parse Object to a cloud code function - parse.comRefresh RestKit file 'lcl_RK.h' not found in RKLog.h - importpython, windows: parsing command lines with shlex - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1614685/noreadaccessexception-exception-while-exporting-lint-errors-to-generate-html-report-in-android-studio&usg=ALkJrhh-KhMdG0ag_0z1hUuW6tRz64RAogStack segment warning in MASM - assemblyЧто значит, если totalMemory невелик, но totalPss очень большой? - androidAutomapper - ReverseMap () does not match - c #All Articles