From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Getting a Google Maps' map for an entry
Date: Wed, 30 Jun 2010 07:28:59 +0200 [thread overview]
Message-ID: <87eifprsv8.fsf@tux.homenetwork> (raw)
In-Reply-To: sa31vbpu9jr.fsf@cigue.easter-eggs.fr
Julien Danjou <julien@danjou.info> 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/
next prev parent reply other threads:[~2010-06-30 5:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 8:42 Getting a Google Maps' map for an entry Julien Danjou
2010-06-29 9:09 ` Thierry Volpiatto
2010-06-29 9:14 ` Giovanni Ridolfi
2010-06-29 12:25 ` Memnon Anon
2010-06-29 15:45 ` Julien Danjou
2010-06-29 16:13 ` Thierry Volpiatto
2010-06-30 5:34 ` Julien Danjou
2010-06-30 5:28 ` Thierry Volpiatto [this message]
2010-06-29 13:12 ` Sebastian Rose
2010-06-29 13:29 ` Sebastian Rose
2010-07-01 9:00 ` d.tchin
2010-07-02 11:56 ` d.tchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eifprsv8.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).