Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!samsung!usc!apple!claris!outpost.UUCP!peirce From: peirce@outpost.UUCP (Michael Peirce) Newsgroups: comp.sys.mac.programmer Subject: Re: Map info in PRAM? Message-ID: <0B010004.ivvmav@outpost.UUCP> Date: 15 Jan 91 18:46:50 GMT Reply-To: peirce@outpost.UUCP Organization: Peirce Software Lines: 36 X-Mailer: uAccess - Mac Release: 1.0.3 In article , saaf@joker.optics.rochester.edu (Lennart Saaf) writes: > > I am trying to access the lattitude and longitude information that is > used by the Map cdev. I assumed that it is stored in parameter RAM, > based partly on the fact that the MacEnvy system configuration cdev > suggests that this is so. There are some reserved (as of IM2) bits in > the fields that make up the PRAM record, but these don't seem to > change when the lattitude & longitude are changed with the Map cdev. > I can't find anything in the Map cdev itself where this info might be > kept. Anyway, even if the Map cdev is trashed, MacEnvy still shows the > same coordinates. I have looked in IM and the tech notes for clues but > haven't found anything. Any clues? Try using the script manager. There is a call called ReadLocation that returns a record of the following format: MachineLocation = RECORD latitude: Fract; longitude: Fract; CASE INTEGER OF 0: (dlsDelta: SignedByte); {signed byte; daylight savings delta} 1: (gmtDelta: LONGINT); {must mask - see documentation} END; There is also a WriteLocation call to make changes. Don't muck with the PRAM directly, use the supported calls! -- michael -- Michael Peirce -- outpost!peirce@claris.com -- Peirce Software -- Suite 301, 719 Hibiscus Place -- Macintosh Programming -- San Jose, California 95117 -- & Consulting -- (408) 244-6554, AppleLink: PEIRCE