src/Map.php
public function diff(MapInterface $map)
    {
        $otherMapData = $map->getMapData();
        $data = array_merge(
            array_diff_assoc($this->map, $otherMapData),
            array_diff_assoc($otherMapData, $this->map)
        );

        return new self($data);
    }
public function diff(MapInterface $map)
    {
        $otherMapData = $map->getMapData();
        $data = array_merge(
            array_diff_assoc($this->map, $otherMapData),
            array_diff_assoc($otherMapData, $this->map)
        );

        return new self($data);
    }
Compare $map to this instance and return a new MapInterface.

Returned object will contain only the elements that differ between the two maps. If a feature
with the same key has different buckets, the buckets from the passed-in $map will be in the
new object.

If this map has a logger, it will be passed to the new map.

@param MapInterface $map

@return MapInterface