Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources

Mobile Client - Open mapping applications when selecting an Address

Status: Implemented
by Copper Contributor alex.cottner on 01-16-2012 10:07 AM

So right now the mobile client just opens google maps in a web browser when running the "showMapForAddress" function. It sure would be nice if it opened the native mapping application. I already use this, but it would be nice if it was included in the stock mobile client.

 

showMapForAddress: function(address) {
            if (navigator.userAgent.match(/ (android) /))
                window.location.href = String.format("geo:0,0?q={0}", address);
            else if (navigator.userAgent.match(/ (iphone|ipod|ipad) /))
                window.location.href = String.format("maps:q={0}", address);
            else   // web browser
                window.location.href = String.format("http://maps.google.com/maps?q={0}", address);        
        }

 This just does a browser check and returns a hyperlink accordingly. If you're on Android it will open your default mapping application (normally Google Maps, but you can change it to be another App). If you're on iOS it opens the google maps application. And if you're on neither it just redirects you to google maps as normal.

Status: Implemented
Comments
by Employee on 01-16-2012 12:18 PM

This was indirectly added in the next release (current Master branch on github) - the defect being clicking an address should open a separate tab versus changing the URL of the current window.

 

You can see the code here (note this uses the dojo framework):

https://github.com/SageSalesLogix/argos-saleslogix/blob/master/src/Environment.js

 

Since it is firing a native event on the link it will follow whatever the system states that link should do.

 

iOS - opens Maps if installed, else uses browser:

http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks...

 

Can't find a source for Android, but from testing it launches the "please select an app to open this with" dialog with Browser/Google Maps in the list (plus other browsers/map apps).

by Copper Contributor alex.cottner on 01-16-2012 12:55 PM

Thanks, I was hoping this would become a stock thing. So it looks like this isn't in 1.2 (at least it doesn't look like it is on GitHub) so I'm guessing this will be released with 1.3 (or maybe included in SLX 8?).

by Employee on 01-16-2012 01:52 PM

Unfortunately you are correct, it didn't make the 1.2 release -- it will be standard in the next release for sure though.

by RJLedger on 01-16-2012 04:22 PM

@Alex - Just made your change to the (1.2) source code in are deployed on our production db..

 

Works GREAT w/both desktop FF/Chrome and on the Samsung Galaxy 10.1 droid tablet!. Just what was needed.

 

I'm going to change ALL of our customer systems and add this to their 1.2 deployments. 

by Moderator Moderator on 01-26-2012 02:41 PM
Status changed to: Implemented
 
by Moderator Moderator on 01-26-2012 02:56 PM
Status changed to: Implemented
 

We want to hear your cool ideas for enhancing Sage SalesLogix products and services. So add your own ideas or kudo (vote) on the ideas of others here! Watch the most valuable bubble to the top!

I have an idea! How do I get started?

One
Read our submission guidelines.

Two
Search for your idea. If you don't see it, submit a new one!

Three
Provide feedback on the ideas of others by voting with kudos and adding comments.
For more information about using ideas, read this thread.

Four
Track your ideas and those you like. Once you've posted or kudoed and idea, subscribe to be notified via email of the latest updates to the idea. From within the idea, click "Idea Options" which appears above the idea title and choose, "Subscribe to this idea".

Be sure to check back from time to time to see new ideas and status updates!

Here is a quick list of the recent ideas for speedy browsing!