Apple Inc. plans to spend 1.7 billion euros ($1.9 billion) building data centers in Ireland and Denmark in its biggest European investment, with the facilities set to run services such as iTunes and maps for users of its devices.