com.r3corda.core.node.services / NetworkMapCache / addMapService

# addMapService

`abstract fun addMapService(net: MessagingService, service: NodeInfo, subscribe: Boolean, ifChangedSinceVer: Int? = null): <ERROR CLASS><Unit>`

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
`service` - 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.