android - how to call parameterized javascript function in the WebKit? -


i trying pass 2 parameters javascript function.this code webview.loadurl("javascript: function_to_call();"); works fine without parameters couldn't use parameters.

this javascript junction :

function changelocation(_lon , _lat){     var zoom=16;     var lonlat = new openlayers.lonlat( _lon , _lat ).transform(                  new openlayers.projection("epsg:4326"),          map.getprojectionobject());      map.setcenter (lonlat, zoom); } 

and how call java :

webview.loadurl("javascript:changelocation( -0.1279688 ,51.5077286 );") ; 

edit: couldn't find problem , changed approach, injecting whole javascript function desired changes everytime when need to. not best solution works. thank help.

what have looks fine. here sample project demonstrates identical syntax.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -