I'm building an Android application where i have to use javascript to show a map. I'm using a WebView that loads an HTML file stored in the assets folder.
    wv=(WebView)findViewById(R.id.webView1);
    wvs=wv.getSettings();
    wv.setWebChromeClient(new WebChromeClient());
    wvs.setJavaScriptEnabled(true);
    wv.addJavascriptInterface(new WebAppInterface(this), "Android");
    wv.loadUrl("file:///android_asset/android_index.html");
In this file, the code dislpays a map using a JavaScript method. I have to center the map (and add a pin) to the current device position. The methods that do these things work fine and the i get the current device position correctly. So, i have to pass the coordinates to the JavaScript method called in the HTML file.
Here the script line where i should use the coordinates:
jQuery(function ($) {
        var map;
        ...
        map.setCenter(/*here latitude*/,/*here longtitude*/);
        ..
});
How can i pass from Java to JavaScript the values i get from the device?