1

I have one HTML page shows map which i want to display in BrowserField. Here is my code.

BrowserFieldConfig _bfConfig = new BrowserFieldConfig();
_bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
_bfConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
_bfConfig.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");

BrowserFieldRequest request = new BrowserFieldRequest("page.html");
BrowserField myBrowserField = new BrowserField(_bfConfig);
add(myBrowserField);

myBrowserField.requestContent(request);
Nate
  • 31,017
  • 13
  • 83
  • 207
Solution
  • 604
  • 4
  • 10

1 Answers1

3

If the "page.html" is local file then,

Everything is OK, except here:

BrowserFieldRequest request = new BrowserFieldRequest("page.html");

Change here like:

BrowserFieldRequest request = new BrowserFieldRequest("local:///page.html");

you are calling the local file, that why we are giving like this.

alishaik786
  • 3,696
  • 2
  • 17
  • 25
  • My html page is load map using JavaScript API. Using your suggestion i tried to load map but it's not display and it redirect to another Google page. please can you help me to get solution for that problem?? – Solution Oct 31 '12 at 09:24