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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -