You are here

public function BingMaps::getAddressUrl in Address Map (& Directions) Link 8

Gets the map link url from an address.

Parameters

\Drupal\address\AddressInterface $address: The address.

Return value

\Drupal\Core\Url The Url.

Overrides MapLinkBase::getAddressUrl

File

src/Plugin/MapLink/BingMaps.php, line 28

Class

BingMaps
Provides a Bing Maps link type.

Namespace

Drupal\address_map_link\Plugin\MapLink

Code

public function getAddressUrl(AddressInterface $address) {
  return Url::fromUri('https://www.bing.com/maps', [
    'query' => [
      'where1' => $this
        ->addressString($address),
    ],
  ]);
}