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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -