A Navigate here Button for all WMAP Parts

Imagine a  'navigate here link' under all the map popups.

 

Also a Imagine  tool button on all events, profiles, ads, groups, and all Wmap parts (Item View pages) to start navigation there?

 

You can easily do it by calling either of the two links suggested, maybe have a popup if device is an Apple device, if the user prefers apple maps or google maps... here is the magic code that can call the navigation up with the destination ;))

Suggested PHP Code:

For Google:

 
So all that needs to be passed to the above strings as destination, will be the Address, City, Country...and postcode if there is one...
 
Should be nice and easy and will change every boonex users life ;)))
Quote · 18 Nov 2015

Already done in a fantastic module.

https://www.boonex.com/m/geo-locator

geo example.JPG · 26K · 499 views
ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 18 Nov 2015

Yep I have the module but it does need to be inside a block and doesn't get sent to an actual navigation app, plus it doesn't work for events groups and profiles there is a bug it only works on my ads...

 

But I have a solution... I added the following changes to add a navigate here button:

 

BXWorldMapModule.php (/modules/boonex/Wmap/classes)

 

Around line 650, after:

 $this->_oTemplate->addCss ('main.css');

 

I added this:

 

 

// Determine Operating System / Add Navigation Link  (Apple Maps / Google Maps)

 

$iNavLink = 'https://www.google.com/maps?saddr=My+Location&daddr=';

 

if(stristr($_SERVER['HTTP_USER_AGENT'],'Mac') || stristr($_SERVER['HTTP_USER_AGENT'],'Apple'))

      $iNavlink = 'https://maps.apple.com/?q=My+Location&daddr=';

 

$iNavLink .= $r['lat'].",".$r['lng'];

 

// distance addition

$iDistance = BxDolService::call('geo_locator', 'GetMyDistance', array($iEntryId,$sPart));

 

$aVars2 = array (

'NavigateMe' => $iNavLink,

'distance' => $iDistance,

        'map' => $this->_oTemplate->parseHtmlByName('map', $aVars),

 

Then in entry_location.html (/modules/boonex/Wmap/templates)

after  __map__

<center><b><bx_text:_DistanceToYou /></b><span id="bx_map_curr_dis">__distance__  </span> <p></p><a href=__NavigateMe__ target="_blank"><bx_text:_NavigateTxt /></a></center>

 

Then Add a Language key for _NavigateTxt 

And _DistanceToYou

 

Its the basic Idea, only thing is i can't get my if to work for apple devices so it opens apple maps instead on apple.. so by default it will open google navigator...

 

 

 

 
Quote · 23 Nov 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.