corda / net.corda.node.services.network / InMemoryNetworkMapCache / addMapService

# addMapService

`open fun addMapService(net: MessagingService, networkMapAddress: SingleMessageRecipient, subscribe: Boolean, ifChangedSinceVer: Int?): ListenableFuture<Unit>`

Overrides NetworkMapCache.addMapService

Add a network map service; fetches a copy of the latest map from the service and subscribes to any further updates.

### Parameters

`net` - the network messaging service.

`networkMapAddress` - the network map service to fetch current state from.

`subscribe` - if the cache should subscribe to updates.

`ifChangedSinceVer` - an optional version number to limit updating the map based on. If the latest map version is less than or equal to the given version, no update is fetched.