2017 © Pedro Peláez
 

elgg-plugin hypemapsopen

Maps built with open tech

image

hypejunction/hypemapsopen

Maps built with open tech

  • Saturday, January 6, 2018
  • by hypeJunction
  • Repository
  • 4 Watchers
  • 3 Stars
  • 61 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 5 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

hypeMapsOpen for Elgg

Elgg 2.3, (*1)

API and UI for maps built with open technology, (*2)

Screenshots

User Map, (*3)

Acknowledgements

  • Plugin has been partially sponsored by [Social Business World] (https://socialbusinessworld.org "Social Business World")

Features

  • Geocoding and reverse geocoding via Nominatim
  • Maps built with Leaflet.js
  • Default map tiles provided by Open Street Maps (customizagle in views)
  • User map
  • Groups map
  • Group members map

Usage

A map of arbitrary locations

echo elgg_view('page/components/map', [
    'markers' => [
        'Berlin, Germany',
        'London, UK',
        'Paris, France',
    ]
]);

A map with custom icons


$berlin = hypeJunction\MapsOpen\Marker::fromLocation('Berlin, Germany'); $berlin->icon = 'smile-o'; $berlin->color = 'green'; $berlin->tooltip = '<b>Berlin is a happy place</b>'; $paris = hypeJunction\MapsOpen\Marker::fromLocation('Paris, France'); $paris->icon = 'coffee'; $paris->color = 'black'; $paris->tooltip = '<img src="https://s-media-cache-ak0.pinimg.com/736x/ca/ea/57/caea57268e1dee696f3c20a5a0f895f2.jpg" alt="Paris" />'; echo elgg_view('page/components/map', [ 'markers' => [ $berlin, $paris, ], ]);

A map of entities

echo elgg_view('page/components/map', [
    'markers' => elgg_get_entities_from_metadata([
        'types' => 'object',
        'subtypes' => 'place',
        'metadata_name_value_pairs' => [
            'venue_type' => 'cafe',
        ],
        'limit' => 0,
    ]),
    'center' => hypeJunction\MapsOpen\Marker::fromLocation('London, UK');
        ]);
echo elgg_view('page/components/map', [
    // Set src to json data source
    // Data set should be an export of Marker instances
    'src' => '/path/to/data/source/json',
    'show_search' => true,
        ]);

Change marker icon and color

Use 'marker','<entity_type>' hook. Supported colors: 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple', 'cadetblue', (*4)


elgg_register_plugin_hook_handler('marker', 'object', function($hook, $type, $return, $params) { $entity = elgg_extract('entity', $params); if ($entity instanceof Event) { $return->icon = 'calendar'; $return->color = 'darkpurple' } return $return; })

Change popup content

Add a view for maps/tooltip/<entity_type>/<entity_subtype> or maps/tooltip/<entity_type>/default;, (*5)

The Versions

06/01 2018

dev-master

9999999-dev http://hypejunction.com

Maps built with open tech

  Sources   Download

GPL-2.0

The Requires

  • php >=5.6
  • composer/installers ~1.0
  • bower-asset/leaflet ~1.0
  • bower-asset/leaflet.awesome-markers ~2.0
  • bower-asset/leaflet.markercluster ~1.0

 

by Ismayil Khayredinov

plugin maps leaflet geocoder location elgg nominatim open street maps

27/06 2017

1.0.2

1.0.2.0 http://hypejunction.com

Maps built with open tech

  Sources   Download

GPL-2.0

The Requires

  • php >=5.6
  • composer/installers ~1.0
  • bower-asset/leaflet ~1.0
  • bower-asset/leaflet.awesome-markers ~2.0
  • bower-asset/leaflet.markercluster ~1.0

 

by Ismayil Khayredinov

plugin maps leaflet geocoder location elgg nominatim open street maps

04/04 2017

1.0.1

1.0.1.0 http://hypejunction.com

Maps built with open tech

  Sources   Download

GPL-2.0

The Requires

  • php >=5.6
  • composer/installers ~1.0
  • bower-asset/leaflet ~1.0
  • bower-asset/leaflet.awesome-markers ~2.0
  • bower-asset/leaflet.markercluster ~1.0

 

by Ismayil Khayredinov

plugin maps leaflet geocoder location elgg nominatim open street maps

05/02 2017

dev-upgrade_fix

dev-upgrade_fix http://hypejunction.com

Maps built with open tech

  Sources   Download

GPL-2.0

The Requires

  • php >=5.6
  • composer/installers ~1.0
  • bower-asset/leaflet ~1.0
  • bower-asset/leaflet.awesome-markers ~2.0
  • bower-asset/leaflet.markercluster ~1.0

 

by Ismayil Khayredinov

plugin maps leaflet geocoder location elgg nominatim open street maps

30/01 2017

1.0.0

1.0.0.0 http://hypejunction.com

Maps built with open tech

  Sources   Download

GPL-2.0

The Requires

  • php >=5.6
  • composer/installers ~1.0
  • bower-asset/leaflet ~1.0
  • bower-asset/leaflet.awesome-markers ~2.0
  • bower-asset/leaflet.markercluster ~1.0

 

by Ismayil Khayredinov

plugin maps leaflet geocoder location elgg nominatim open street maps