Page 1 of 1

(RDMLX) Web View HTML Map Links

Posted: Tue Oct 06, 2015 3:27 am
by edwardtn
Hello,

My application is using local html and JavaScript in Web Views to access local data for offline use. When using email, phone, and SMS links the app(s) handle (intercept) the links correctly and use the native email/phone/messaging applications. Map links do not seem to be intercepted (on any platform) and open a Google Maps URL in the Web View.

I am formatting my Map Links according to the Apple iOS Developer URL Scheme: https://developer.apple.com/library/ios ... Links.html

Is there any specific way LongRange is expecting to use Map Links in a Web View to ensure they are opened in the native Map application? Or, is there a native map API that is available via JavaScript?

Thanks in advance!

Re: (RDMLX) Web View HTML Map Links

Posted: Tue Oct 06, 2015 7:53 am
by tsupartono
Hi Edward,
You can invoke the OpenURL operation, that should open the native Map app.
Please have a look at the JavaScript code example below (you can also directly invoke the OpenURL operation from your RPG/RDMLX code if you wish).
Let me know how you go.

Code: Select all


<head>
	<script language=javascript>

	function openMap()
	{
		var options =
		{
			operation:
			{
				type: "openurl",
				url: "http://maps.apple.com/?q=122+Arthur+St+North+Sydney"
			}
		};
		LONGRANGE.Form.runOperation(options);
	}
	</script>

</head>

</script>
<body>
	<button onclick="openMap()">Click Me!</button>
</body>


Re: (RDMLX) Web View HTML Map Links

Posted: Thu Oct 08, 2015 12:20 am
by edwardtn
Hi Tony,

Sorry for the late response. This solution worked perfectly...exactly what I needed.

Thanks!

Edward