webOS Nation Forums >  webOS Developers >  webOS Development > New Google Maps for WebOS - native javascript API
New Google Maps for WebOS - native javascript API
  Reply
Like Tree356Likes

 
Thread Tools Display Modes
Old 11/12/2012, 12:14 PM   #1101 (permalink)
Member
 
Posts: 54
Quote:
Originally Posted by gizmo21 View Post
btw. is the new feature already implemented in newest 0.2.6
the strike in the first post, is suggesting it:
change the default handler for LOC location coordinates in webOS, as you did for adresses?

I can't get it to work. Updated app (did not uninstall/install) and reregistered as standard app for maps. But LOCs won't open in your app. Neither mojowhatsup nor patched messageapp "insert GPS location"

New Google Maps for WebOS - native javascript API
Did you try uninstalling/reinstalling?
As i found out it really depends on the app used. Some seem to refuse the setting in the default application area. Or it might be hardcoded.

Edit: It seems GM is not selectable for certain file types. Maybe it can't handle them or Jan could somehow magically add the specific file types to supported as seen in webOS. Or he has already and the version oof webOS you and me use are simply not recognizing the tags in the GM application correctly.

Last edited by fabianlanco; 11/12/2012 at 12:22 PM.
fabianlanco is offline   Reply With Quote
Old 11/12/2012, 12:25 PM   #1102 (permalink)
pivotCE Developer
 
Posts: 2,187
Quote:
Originally Posted by fabianlanco View Post
Did you try uninstalling/reinstalling?
As i found out it really depends on the app used. Some seem to refuse the setting in the default application area. Or it might be hardcoded.
As i said above i did not cause did not want to loose markers. But if jan tell me it is implemented already and working, i'll do an uninstall (if i think about perhaps i even tried that on my testing device).
Is it working for you fabianlanco?


btw. jan that is the code mojowhatsup uses, so it really is an standard system call and no app specific on:
Quote:
stageController.activeScene().serviceRequest("palm://com.palm.applicationManager", {
method : "open",
parameters : {
target: "maploc:" + msg.latitude + "," + msg.longitude
}
});
Tested again on Test Pre3 - uninstalled - set default maps provider to HP Maps - rebooted - installed 0.2.6 - set default maps provider to HB GMaps -> not working in mojowhatsup -> rebooted -> not working
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?

Last edited by gizmo21; 11/12/2012 at 04:14 PM.
gizmo21 is online now   Reply With Quote
Old 11/12/2012, 08:00 PM   #1103 (permalink)
Member
 
Posts: 74
Quote:
Originally Posted by gizmo21 View Post
As i said above i did not cause did not want to loose markers. .
That suggests an interesting feature to add. The ability to import and export waypoints/markers/poi with a plain text CSV file (is there a standardized format?)
BenL is offline   Reply With Quote
Old 11/13/2012, 01:32 AM   #1104 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 488
Hi,
the LOC handling in webOS is problematic. We have to separate two things, Just Type handling and URI handling. JustType handling works and is supported, you can setup any supported application in settings and next, JustType launch exactly the selected app using maploc parameter. But the location URI is hardcoded to com.palm.app.maps - Bing Maps - (or similar I dont know exactly now). This is launched using applicationManager, which use the hardcoded resources, where is hardcoded:

Code:
{"url":"^mapto:", "appId":"com.palm.app.maps"},
    {"url":"^maploc:", "appId":"com.palm.app.maps"},
If you change it to cz.72ka.googlemaps, URI will be handled using my app. But this is not an easy task for every user. More info here https://developer.palm.com/content/a...n-manager.html

But not be sad, I have to look into my private post, where we discused about it long time ago and If I remember, some solution exists.



Second, about export/import... Im thinking long time about Save/Restore app support to my app, where the Settings and Favorites could be saved. It is easy, it is only about my time.
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Old 11/13/2012, 03:01 AM   #1105 (permalink)
pivotCE Developer
 
Posts: 2,187
opps sorry i interpreted your feature posting wrong. i thought it was about that newly requests regarding mojowhatsup.

hhm and just editing command-resource-handlers.json in /usr/palm didn't bring it, even if it looks alot like it. But it seems you brake browser with it.

ok now i'm patently waiting
gizmo21 is online now   Reply With Quote
Old 11/13/2012, 09:35 AM   #1106 (permalink)
Member
 
Posts: 54
Something just popped into my head, might be rather stupid, but nevertheless:
Will renaming the app folder (/media/cryptofs/apps/usr/palm/...) to com.palm.app.maps and renamimg the original to sth. else fix your issue?
Theoretically it should work if it is simply an opening/launching of whatever is in the appropiate folder.

Might break some other things on your device related to map handling.
But that's what your testing device is for, is it not?

btw: i'm sorry if i sounded like talking to a stupid little kid before. Was totally not my intention.
fabianlanco is offline   Reply With Quote
Old 11/13/2012, 10:40 AM   #1107 (permalink)
Member
 
jcmarcos's Avatar
 
Posts: 878
Quote:
Originally Posted by fabianlanco View Post
Something just popped into my head, might be rather stupid, but nevertheless:
Will renaming the app folder (/media/cryptofs/apps/usr/palm/...) to com.palm.app.maps and renamimg the original to sth. else fix your issue?
How about using a link then? Does webOS filesystem support it?
__________________
Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
jcmarcos is offline   Reply With Quote
Old 11/13/2012, 11:05 AM   #1108 (permalink)
pivotCE Developer
 
Posts: 2,187
i think before doing those wild hacks and having inevitable drawbacks over the high variety of OS versions, it is better to see what Jan comes up with:

Quote:
But not be sad, I have to look into my private post, where we discused about it long time ago and If I remember, some solution exists
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is online now   Reply With Quote
Old 11/13/2012, 02:37 PM   #1109 (permalink)
Member
 
dkirker's Avatar
 
Posts: 1,019
Quote:
Originally Posted by 72ka View Post
Hi,
the LOC handling in webOS is problematic. We have to separate two things, Just Type handling and URI handling. JustType handling works and is supported, you can setup any supported application in settings and next, JustType launch exactly the selected app using maploc parameter. But the location URI is hardcoded to com.palm.app.maps - Bing Maps - (or similar I dont know exactly now). This is launched using applicationManager, which use the hardcoded resources, where is hardcoded:

Code:
{"url":"^mapto:", "appId":"com.palm.app.maps"},
    {"url":"^maploc:", "appId":"com.palm.app.maps"},
If you change it to cz.72ka.googlemaps, URI will be handled using my app. But this is not an easy task for every user. More info here https://developer.palm.com/content/a...n-manager.html

But not be sad, I have to look into my private post, where we discused about it long time ago and If I remember, some solution exists.



Second, about export/import... Im thinking long time about Save/Restore app support to my app, where the Settings and Favorites could be saved. It is easy, it is only about my time.
Try changing the mimeTypes part in your appinfo.json to this:

Code:
"mimeTypes": [
        {"scheme": "mapto"},
        {"scheme": "maploc"},
        {"scheme": "telenav"},
        { "urlPattern": "^mapto:" },
        { "urlPattern": "^maploc:" }
    ],
The urlPattern part will regex match just like the url property in the command-resource-handlers.json file.
__________________
The comments and thoughts expressed on this discussion board are strictly my own and are not those of OpenMobl Systems.
dkirker is offline   Reply With Quote
Old 11/14/2012, 07:04 AM   #1110 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 488
Quote:
Originally Posted by dkirker View Post
Try changing the mimeTypes part in your appinfo.json to this:

Code:
"mimeTypes": [
        {"scheme": "mapto"},
        {"scheme": "maploc"},
        {"scheme": "telenav"},
        { "urlPattern": "^mapto:" },
        { "urlPattern": "^maploc:" }
    ],
The urlPattern part will regex match just like the url property in the command-resource-handlers.json file.
Nice... I have to try it. But Im not sure if this call contains the same object for location as just type - first succes will be if my app will start instead of BingMaps . Anyway, I tried to install mojowhatsapp to emulator and it doesnt work... I dont know this app, it contains some arm binaries? Looks like I have to test it on my Pre.
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Old 11/14/2012, 07:53 AM   #1111 (permalink)
Homebrew Developer

 
Posts: 2,402
Quote:
Originally Posted by 72ka View Post
Nice... I have to try it. But Im not sure if this call contains the same object for location as just type - first succes will be if my app will start instead of BingMaps . Anyway, I tried to install mojowhatsapp to emulator and it doesnt work... I dont know this app, it contains some arm binaries? Looks like I have to test it on my Pre.
Yes it's a hybrid app, contains some c/c++ and regular HTML with Mojo.

Not sure how this runs in the emulator, if at all?
Herrie is offline   Reply With Quote
Old 11/14/2012, 08:48 AM   #1112 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 488
Huh... am I crazy? I remember some google search results in browser which launched the BingMaps... some location uri. Now I cant find any link which want to start maps app, every location links is redirected to mobile version of google maps site inside the browser. Looks like google changed this behavior for webOS browsers?
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Old 11/14/2012, 11:51 AM   #1113 (permalink)
pivotCE Developer
 
Posts: 2,187
Try "mapto://Praha" without quotes in browser. This already launches your app on my devices
well with "//Praha" in your app but that is fixable i think.
"mapto:40.446195,-79.948862" also launches your app -> but also sometime google search
best results are if you launch from browser startpage (favorites shown).

But sadly "maploc://40.446195,-79.948862" doesn't work at all and
"maploc:40.446195,-79.948862" launches HP Maps.
"maploc://praha" launches HP Maps

Well apps either launch via applicationManager (mojowhatsup):

Code:
stageController.activeScene().serviceRequest("palm://com.palm.applicationManager", {
method : "open",
parameters : {
target: "maploc:" + msg.latitude + "," + msg.longitude
}
});
or via href (org.webosinternals.patches.messaging-location-sharing-in-messaging):

Code:
result += "<a href=\"maploc:" + matches[0] + "\">" + matches[0] + "</a>";
or via direct application call com.palm.maps with cross-app-launching (Klicktel):

Quote:
new Mojo.Service.Request('palm://com.palm.applicationManager',
{
method: 'open',
parameters: {
id:"com.palm.app.maps",
params:
{
"query" : wgslong + ' ' + wgslat
} } });
which you can't do anything about except asking dev to implement your cross-app launching params (when available)
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?

Last edited by gizmo21; 11/14/2012 at 12:14 PM. Reason: Updated
gizmo21 is online now   Reply With Quote
Old 11/15/2012, 08:16 AM   #1114 (permalink)
Member
 
jcmarcos's Avatar
 
Posts: 878
Sorry for disturbuing, guys. I see a lot going on about opening Jan's app when clicking in a textbox that has a location. In my Pre 3, with no tricks about this, I open a contact, click on its address field, and yes, Homebrew Google Maps opens, but it's a pity that the original address got lost, replaced by JavaScript classic "undefined" term.

Is that what you are talking about? Or is it about Jan's app not opening, but the old Bing Maps instead?
__________________
Pre 3 on GSM Jazztel: UberKernel, Muffle logging & friends, Mode Switcher, Advanced System Menus & Prefs, and then some more.

Proudly choosing the loser side since 1982: Commodore VIC-20, C-64, Amiga 1000 & 3000, bPlan Pegasos & MorphOS, Psion Revo, Palm Pre...
jcmarcos is offline   Reply With Quote
Old 11/15/2012, 08:58 AM   #1115 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 488
Quote:
Originally Posted by gizmo21 View Post
Try "mapto://Praha" without quotes in browser. This already launches your app on my devices
well with "//Praha" in your app but that is fixable i think.
"mapto:40.446195,-79.948862" also launches your app -> but also sometime google search
best results are if you launch from browser startpage (favorites shown).

But sadly "maploc://40.446195,-79.948862" doesn't work at all and
"maploc:40.446195,-79.948862" launches HP Maps.
"maploc://praha" launches HP Maps
Very nice reports.... but Im scared about things which happen "sometimes" ....
E.g. "mapto://Praha" on webOS 2.1 always launch bing maps, on my Pre3 with 2.2.4 launch my app without modifications! I see here next inconsistency between webOS versions.

Anyway, address from Contact always launch my app and with filled search bar on my phone... if someone have an issues with that, please send me your system/settings/patches/app version configuration.

Anyway, I wrote today after a lunch break a very simple app for HERE maps from Nokia... just submitted to Preware. They plan to release API next year, it sounds nice for me... I welcome it, chance to make a new native maps app for webos - or openWebOS sure
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Old 11/15/2012, 10:05 AM   #1116 (permalink)
pivotCE Developer
 
Posts: 2,187
Ok here is a workaround for all Mojowhatsup users with webOS 2.2.4: http://forums.webosnation.com/webos-...ml#post3363149

Hope jan get's it fixed for the whole OS (on all versions ) , but for me this is ok for now - will do the same in the patch "messaging-location-sharing-in-messaging"
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is online now   Reply With Quote
Old 11/15/2012, 10:14 AM   #1117 (permalink)
Homebrew Developer
 
72ka's Avatar
 
Posts: 488
Ouch... on webOS 2.1 the same correct behavior, my mistake, I forget to set my app as default address handler in my 2.1 emulator. It means your patch could work on webOS 2.1 too....
__________________
HP Pre3, the Google Maps, wInNeR, Gas&Oil, HERE maps for webOS development
72ka is offline   Reply With Quote
Liked by gizmo21 likes this.
Old 11/17/2012, 05:53 AM   #1118 (permalink)
Member
 
Posts: 96
Hi all!

I am trying to install this app on my HP Veer (2.1.2.) from Preeware but the process stops at some point, here:


Any suggestion? :-)
Trovatore is offline   Reply With Quote
Old 11/17/2012, 01:58 PM   #1119 (permalink)
Member
 
Posts: 74
Quote:
Originally Posted by Trovatore View Post
Hi all!

I am trying to install this app on my HP Veer (2.1.2.) from Preeware but the process stops at some point, here:

Any suggestion? :-)
Try rebooting and then download the app again? I've found that will usually work if Preware hangs after downloading the file.
BenL is offline   Reply With Quote
Thanked By: Trovatore
Old 11/18/2012, 05:48 AM   #1120 (permalink)
Member
 
Posts: 96
Quote:
Originally Posted by BenL View Post
Try rebooting and then download the app again? I've found that will usually work if Preware hangs after downloading the file.
Worked! :-) Thanks for the tip; i will remind it!
Trovatore is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0