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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -