javascript - update a function defined in html file from a js file -
i defined function in html file returns center of map:
<script> rf = function (){ return map.getcenter().wrap(); }; </script> <script src='./f.js'></script>
then call function "f.js", by:
var center = (rf())
the problem when move map center same before.
thanks
ps: function works in console.
when move map should run center = (rf())
set center
again because center
not change result of map.getcenter().wrap()
Comments
Post a Comment