Log in

hypeMapsOpen

hypeMapsOpen for Elgg

Elgg 3.0

API and UI for maps built with open technology

Screenshots

User Map

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 = 'Berlin is a happy place'; $paris = hypeJunction\MapsOpen\Marker::fromLocation('Paris, France'); $paris->icon = 'coffee'; $paris->color = 'black'; $paris->tooltip = '

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');
        ]);

A map with data source and search

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','' hook. Supported colors: 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple', 'cadetblue'


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// or maps/tooltip//default;

Acknowledgements

  • Early version of the plugin has been partially sponsored by [Social Business World] (https://socialbusinessworld.org "Social Business World")

Package Releases

VersionRelease Date
hypeMapsOpen 2.1.22.1.2
hypeMapsOpen 2.1.12.1.1
hypeMapsOpen 2.1.02.1.0
hypeMapsOpen 2.0.82.0.8
hypeMapsOpen 2.0.72.0.7
hypeMapsOpen 2.0.62.0.6
hypeMapsOpen 2.0.52.0.5
hypeMapsOpen 2.0.42.0.4
hypeMapsOpen 2.0.32.0.3
hypeMapsOpen 2.0.22.0.2
hypeMapsOpen 2.0.12.0.1
hypeMapsOpen 2.0.02.0.0

Changelog

2.1.0 (2018-06-29)

Bug Fixes

  • fields: do not enable location by default (0446686)
  • fields: move location field to content area (f6f2ac2)
  • fields: sync with new fields API (68caf08)
  • forms: add location field to all entity types (e3cc92f)
  • groups: do not display group module if sitewide setting is disabled (5ea2ba2)
  • loader: fix ajax loader positioning (407cfda)
  • marker: fix marker export values (91cef93)
  • profile: make location field public and store in metadata (545187a)
  • routes: throw correct exception when feature is disabled (54904b7)
  • upgrades: add upgrade scripts (2d91423)

Features

2.0.8 (2018-03-28)

Bug Fixes

  • loader: fix ajax loader positioning (407cfda)

2.0.7 (2018-03-28)

Bug Fixes

  • fields: sync with new fields API (68caf08)

2.0.6 (2018-03-27)

Bug Fixes

  • marker: fix marker export values (91cef93)

2.0.5 (2018-03-26)

Bug Fixes

  • upgrades: add upgrade scripts (2d91423)

2.0.4 (2018-03-26)

Bug Fixes

  • groups: do not display group module if sitewide setting is disabled (5ea2ba2)
  • profile: make location field public and store in metadata (545187a)
  • routes: throw correct exception when feature is disabled (54904b7)

2.0.3 (2018-03-26)

Bug Fixes

  • fields: move location field to content area (f6f2ac2)

2.0.2 (2018-03-26)

Bug Fixes

  • fields: do not enable location by default (0446686)

2.0.1 (2018-03-23)

Bug Fixes

  • forms: add location field to all entity types (e3cc92f)

2.0.0 (2018-03-19)

Bug Fixes

  • json: prevent html double-quotes from breaking the map (1c58a9b)

Features

  • releases: upgrade for Elgg 3 (cd5357c)

1.0.2 (2017-06-27)

Bug Fixes

  • maps: fix use statement that prevents the map from centering correctly (2d75896)

1.0.1 (2017-04-03)

1.0.0 (2017-01-30)

Bug Fixes

  • composer: fix installer name to match plugin id (c9137ee), closes #2
  • settings: correctly validate if plugin setting is set (1275047)

Features

  • perf: move batch geocoding to an upgrade script (08be7b0)
  • releases: initial commit (ecd200e)

About

Dependencies

Requires
Elgg version >= 3.0