Content

Feature #1155

Maps does not properly support opening maploc: nor mapto: URLs

Added by Doug Reeder over 3 years ago. Updated over 3 years ago.

Status:New Start date:06/05/2016
Priority:Normal Due date:
Assignee:- % Done:

0% Total progress

Category:Applications
Target version:-

Description

To reproduce:
1) At the command line on-device, enter
luna-send -n 1 palm://com.palm.applicationManager/open '{"target": "maploc:Toledo%20Spain"}

Desired result: Maps opens and searches for "Toledo Spain"

Actual result: Maps opens

2) At the command line on-device, enter
luna-send -n 1 palm://com.palm.applicationManager/open '{"target": "mapto:Toledo%20Spain"}

Desired result: Maps opens and searches for a route to "Toledo Spain"

Actual result: Maps opens

These are required to fully support addresses in the Contacts app (and this is how Maps behaves under webOS).


Issue Hierarchy ()

History

Updated by Herman van Hazendonk over 3 years ago

This is the code that's doing the actual work in 3.0.5 Maps app:

processLaunchParamsTarget: function(inParams) {
var t = inParams.target, r;
if (t) {
var addr;
if (t.indexOf("mapto:") == 0) {
r = true;
addr = t.substring(6);
} else if (t.indexOf("maploc:") == 0) {
addr = t.substring(7);
}
if (addr) {
// remove leading slashes
addr = addr.replace(/^\/\//g, '');
// url decode
addr = decodeURIComponent(addr);
if (r) {
inParams.route = {endAddress: addr};
} else {
inParams.address = addr;
}
}
}
},

Also available in: Atom PDF