Memnon Anon <gegendosenflei...@googlemail.com> writes:
> Hi,
>
> Sebastian Rose <sebastian_r...@gmx.de> writes:
>
>> there is a light and easy way to use google and openstreetmap.org maps
>> if you define them as a custom link type:
>>
>> (setq org-link-abbrev-alist
>>   '(("gmap"
>>      . "http://maps.google.com/maps?q=%s";)
>>     ("omap"
>>       . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1";)))
>>
>> Now
>>   [[gmap:Falkenstr 10, Hannover, Germany][Falkenstraße]]
>>
>> and
>>   [[omap:Falkenstr 10, Hannover, Germany]]
> [...]
>
> This works fine for viewing in an external browser like conkeror or ff,
> but fails for me in emacs w3m.
>
> Memnon


Yes.  For this to work, you'd to do something like this (untested):


(defun org-follow-gmap-link (path)
  "Follow a google-map link when clicked."
  (browse-url-mozilla
   (concat "http://maps.google.com/maps?q="; path)))

(org-add-link-type "gmap" 'org-follow-gmap-link nil)


(defun org-follow-omap-link (path)
  "Follow a osm-map link when clicked."
  (browse-url-mozilla
   (concat
    "http://nominatim.openstreetmap.org/search?q=";
    path "&polygon=1")))

(org-add-link-type "omap" 'org-follow-omap-link nil)




HTH

   Sebastian


_______________________________________________
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