-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit 5487937
committed
feature #2547 [Map] markers, polygons and polylines removal (sblondeau)
This PR was merged into the 2.x branch.
Discussion
----------
[Map] markers, polygons and polylines removal
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Add new methods to remove markers, polygons or polylines (map elements)
Map elements will be store in SplObjectStorage instead of arrays.
When create a map element, you can now add an optional identfier (string).
New methods `getMarker(string identifier)`, `getPolygon(string identifier)` and `getPolyline(string $identifier)` car retreive a map element from its identfiier.
example
$departureMarker = new Marker (
position: new Point(45.7640, 4.8357),
title: 'Lyon',
identifier: 'departure'
)
$map->addMarker($departureMarker);
// remove marker with
$map->removeMarker($departureMarker)
// or
$map->removeMarker($map->getMarker('departure'));
Commits
-------
e19fff9 [Map] Add dedicated methods to remove Marker, Polygon and Polyline instances from a MapFile tree
0 file changed
+0
-0
lines changedFilter options
0 file changed
+0
-0
lines changed
0 commit comments