Q:

When was the use of detailed maps for military campaigns widely adopted? 

I remember definitively, they were there during the Napoleonic wars.  Napoleon himself was a part of one Bureau of Topography for a while. 
An auxiliary question, how did they ever get to survey lands in rival countries? 
Or was stealing maps really a thing?  

A:

To add to Pieter Geerkens great answer, another forerunner to modern military mapping is of course the Roy Military Survey of Scotland produced from 1747 to 1755.  The whole map is available online.  
https://maps.nls.uk/geo/explore/#zoom=7&lat=56.7684&lon=-5.2386&layers=3&b=1
https://maps.nls.uk/roy/
This map was produced by Hanoverian troops during the occupation of the Highlands in it's wars against the Jacobite's.  During the Jacobite uprising of 1745, the British military realised that much of Scotland was totally unknown.  Maps were incomplete or centuries out of date, pieced together from interviews with people rather than an on the ground survey with modern engineering equipment.  Without maps, they found that those with arrest warrants could escape into the hills and slip away down glens and lochs and out to sea.  
Scotland's landmass was utterly impassible to outsiders at the time.  Even today, the most Northern city in the UK is 120 miles from the north coast and the entire North West Coast is a rugged wilderness.  
So to answer your supplementary question, one way to map a foreign land was to occupy it and then send a team of engineers to survey it for a decade.. 
This early map was a precursor to the now famous Ordnance Survey maps of the UK used by everyone from town planners to hikers.  

More generally, the Roy map is a landmark of cartography, exemplifying
  emerging standards in military surveying and cartography.  It held a
  seminal influence on British military mapping in the later 18th
  century, and, not least through its chief surveyor William Roy, had a
  crucial influence on the early work of the Ordnance Survey itself. 
  https://maps.nls.uk/roy/

References:
- Map of a Nation by Rachel Hewitt

A:

Definitely the Napoleonic Wars.  The Cassini Map of France, completed 1789 as the magnum opus of three generations of the Cassini family, was the first detailed topographic map of a modern nation state.  At a scale of 1:86,400, it expanded a triangulation of France begun in 1669 and completed in 1748. 

A decade earlier the Ferraris Map of the Austrian Netherlands (legend and index) was completed.  Though non-topographical by modern standards it still impresses with its detail, as this 30% excerpt of terrain around the Battle of Ligny attests..

Within a few years of the Cassini Map being completed the newly royal King of Bavaria commissioned a detailed topographical map of his demesne, from which this Schwdenschanze north east of Landshut is excerpted. 

It is available online at the Bavarian State Library

