2017 © Pedro PelĂĄez
 

neos-plugin googlemaps

Google Maps as Content Element

image

jonnitto/googlemaps

Google Maps as Content Element

  • Sunday, April 29, 2018
  • by jonnitto
  • Repository
  • 2 Watchers
  • 5 Stars
  • 2,045 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 20 Versions
  • 12 % Grown

The README.md

Latest Stable Version Total Downloads License GitHub forks GitHub stars GitHub watchers GitHub followers Follow Jon on Twitter, (*1)

Jonnitto.GoogleMaps Package for Neos CMS

With this package you can include Google Maps and / or Streetview and even Static Maps in a simple way into Neos CMS. Contributions are very welcome!, (*2)

Installation

Most of the time you have to make small adjustments to a package (e.g. configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site packages located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:, (*3)

composer require jonnitto/googlemaps --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Et voilĂ ! Your desired package is now installed correctly., (*4)

Google API

You'll need at least an API Key from Google, and if you want to use Static Maps, you need also a signing secret. Read here how to get these keys
You will need following APIs:, (*5)

Modification

  • To set the options, use the global variable GoogleMapsOptions
  • To set the marker pin, use the global variable GoogleMapsPin
  • To include functions, use GoogleMapsFunction

In the Javscript of the package, following code gets executed:, (*6)


if (typeof GoogleMapsPin === "string") { marker.icon = GoogleMapsPin; } else if (typeof GoogleMapsPin === "object") { extend(marker, GoogleMapsPin); } if (typeof GoogleMapsFunction === "function") { GoogleMapsFunction(); } if (typeof GoogleMapsOptions === "object") { extend(object.Map.options, GoogleMapsOptions); } if (typeof GoogleStreetviewOptions === "object") { extend(object.Streetview.options, GoogleStreetviewOptions); }

Like that, you can do almost everything with the map., (*7)

Example: Custom pin

window.GoogleMapsFunction () => {
    window.GoogleMapsPin = {
        icon: {
            url: '/YOUR/PATH/TO/THE/MapPin.png',
            anchor: new google.maps.Point(10, 50),
            scaledSize: new google.maps.Size(22, 40)
        }
    };
}

or, (*8)

window.GoogleMapsPin = '/YOUR/PATH/TO/THE/MapPin.png';

Example: Custom map options

window.GoogleMapsOptions = {
    streetViewControl: false,
    mapTypeControl: false,
    scrollwheel: false,
    styles: [
        {
            "elementType": "geometry",
            "stylers": [
                {
                    "color": "#f5f5f5"
                }
            ]
        }
    ]
};

The Versions

29/04 2018

dev-master

9999999-dev

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

29/04 2018

3.2.0

3.2.0.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

23/10 2017

3.1.0

3.1.0.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

24/05 2017

3.0.7

3.0.7.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

22/05 2017

3.0.6

3.0.6.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

21/04 2017

3.0.5

3.0.5.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

29/03 2017

v3.0.4

3.0.4.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

22/03 2017

v3.0.3

3.0.3.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

27/02 2017

v3.0.2

3.0.2.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

25/02 2017

v3.0.1

3.0.1.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

30/01 2017

v3.0.0

3.0.0.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

07/12 2016

2.2.x-dev

2.2.9999999.9999999-dev

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

18/10 2016

2.2.0

2.2.0.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

18/10 2016

2.1.7

2.1.7.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

29/09 2016

2.1.6

2.1.6.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

flow neos map googlemaps contentelement

23/04 2016

2.1.4

2.1.4.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

07/04 2016

2.1.3

2.1.3.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

28/03 2016

2.1.2

2.1.2.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

28/03 2016

2.1.1

2.1.1.0

Google Maps as Content Element

  Sources   Download

MIT

The Requires

 

28/03 2016

2.1.0

2.1.0.0

Google Maps as Content Element

  Sources   Download

The Requires