Julien Danjou <jul...@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/


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to