Start a new topic

HTMLDrawable - Weather Widget


We have created a weather widget which uses the HTML5 getLocation function to get the location of the user and display the current weather condition.

It is hosted on an external website.

We are trying to pass the URI of that to the HTMLDrawable of Wikitude, however there is a blank display.

We tried loading on in the HTMLDrawable and it works fine, however the weather widget does not seem to be working.

Url for the weather widget:

Source Code: 

var weatherWidget = new AR.HtmlDrawable({
			uri: ""
		}, 1, {
			viewportWidth: 750,
			viewportHeight: 450,
			backgroundColor: "#FFFFFF",
			offsetX: .5,
			offsetY: -1.5,
			clickThroughEnabled: true,
			allowDocumentLocationChanges: true,
			onDocumentLocationChanged: function onDocumentLocationChangedFn(uri) {

  Can you please let us know how to get this to work or if there is a workaround to get the user's current location and show the respective weather.

Hi Team, Any update on this?

Please note that HTMLDrawables run in an isolated context and are not equipped with Wikitude's AR namespace. Commands like "AR.context.openInBrowser" therefore solely work in the "normal" WebView

Login or Signup to post a comment