From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Volpiatto Subject: Re: Getting a Google Maps' map for an entry Date: Wed, 30 Jun 2010 07:28:59 +0200 Message-ID: <87eifprsv8.fsf@tux.homenetwork> References: <87vd9211k8.fsf@mean.albasani.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=38999 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTpuF-0002m7-Fi for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 01:32:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTpuB-0000i6-8A for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 01:32:19 -0400 Received: from lo.gmane.org ([80.91.229.12]:59988) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTpuB-0000hm-1T for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 01:32:15 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OTpu4-0001qE-JJ for emacs-orgmode@gnu.org; Wed, 30 Jun 2010 07:32:08 +0200 Received: from 33.77.197-77.rev.gaoland.net ([77.197.77.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jun 2010 07:32:08 +0200 Received: from thierry.volpiatto by 33.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jun 2010 07:32:08 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Julien Danjou writes: > On Tue, Jun 29 2010, Memnon Anon wrote: > >> It would be nice the initial zoom level of a map would be set right at >> the beginning. > > The problem is that this is not possible. The zoom level, if not > specified, is determined automatically by Google Maps, and we have no > clue about its value. > > Therefore you need to press 'w' (with an eventual prefix) to set a first > zoom level. Specifying zoom level at startup seem to fix the problem: ,---- | (defun google-maps (location &optional no-geocoding) | "Run Google Maps on LOCATION. | If NO-GEOCODING is t, then does not try to geocode the address | and do not ask the user for a more precise location." | (interactive | (list | (if (use-region-p) | (buffer-substring-no-properties | (region-beginning) (region-end)) | (read-from-minibuffer "Location: " | nil nil nil nil | (replace-regexp-in-string | "\n" " " | (or (thing-at-point 'sentence) "")))))) | (let ((location (if no-geocoding | location | (google-maps-geocode-location location)))) | (google-maps-static-show :zoom google-maps-static-default-zoom | :markers `(((,location)))))) `---- I use 10 as default value for `google-maps-static-default-zoom'. -- Thierry Volpiatto Gpg key: http://pgp.mit.edu/