jinjie/geocodable-maps-js

Add Google Map JS to Addressable module in Silverstripe 4

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

1.2.0 2021-06-07 04:03 UTC

This package is auto-updated.

Last update: 2024-11-07 11:07:41 UTC


README

Add Google Map JS to Addressable module in Silverstripe 4

🏠 Homepage

Overview

Use this module to add an Google Map JS to Silverstripe 4. This requires Addressable.

Install

composer require jinjie/geocodable-maps-js

How to use

Since this depends on Lat and Lng that are provided by Geocodable, please also apply Geocodable extension to your DataObject. This requires an API key

You can also define GOOGLE_API_KEY in .env

MyDataObject:
  extensions:
    - Symbiote\Addressable\Addressable
    - Symbiote\Addressable\Geocodable
    - SwiftDevLabs\GeocodableMaps\GeocodableMapJs

Template

Put $AddressMapJs to your template place the map into your template. There are 3 parameters available:

public function AddressMapJs($zoom = 12, $width = '100%', $height = 300)

Author

👤 Kong Jin Jie

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

This README was generated with ❤️ by readme-md-generator