emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Yet another way to use maps --- the light way
@ 2010-09-23  8:17 Sebastian Rose
  2010-09-23 12:14 ` Carsten Dominik
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sebastian Rose @ 2010-09-23  8:17 UTC (permalink / raw)
  To: Emacs-orgmode mailing list

Hi,


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]]

show a map in your browser.  LaTeX and HTML export works out the box
with the advantage, that this export can legally be published on the
internet without any additional action (API license key).  Even on
commercial sites, as it's just a link to google.  OSM is no problem
anyway.


This way it's possible to show a certain place on earth, but not a track
or route.



There's a (known) bug in the LaTeX eporter:

        [[Falkenstraße 10, Hannover, Germany]]

will _not_ work, because the german Umlaut will be distorted somehow
(unless fixed already....)



  Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Yet another way to use maps --- the light way
  2010-09-23  8:17 Yet another way to use maps --- the light way Sebastian Rose
@ 2010-09-23 12:14 ` Carsten Dominik
  2010-09-23 19:30 ` Memnon Anon
  2010-09-24  7:18 ` Carsten Dominik
  2 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-09-23 12:14 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Emacs-orgmode mailing list


On Sep 23, 2010, at 10:17 AM, Sebastian Rose wrote:

> Hi,
>
>
> 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")))

Wow, this is pretty cool.

- Carsten

>
>
>
> Now
>  [[gmap:Falkenstr 10, Hannover, Germany][Falkenstraße]]
>
> and
>  [[omap:Falkenstr 10, Hannover, Germany]]
>
> show a map in your browser.  LaTeX and HTML export works out the box
> with the advantage, that this export can legally be published on the
> internet without any additional action (API license key).  Even on
> commercial sites, as it's just a link to google.  OSM is no problem
> anyway.
>
>
> This way it's possible to show a certain place on earth, but not a  
> track
> or route.
>
>
>
> There's a (known) bug in the LaTeX eporter:
>
>        [[Falkenstraße 10, Hannover, Germany]]
>
> will _not_ work, because the german Umlaut will be distorted somehow
> (unless fixed already....)
>
>
>
>  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

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Yet another way to use maps --- the light way
  2010-09-23  8:17 Yet another way to use maps --- the light way Sebastian Rose
  2010-09-23 12:14 ` Carsten Dominik
@ 2010-09-23 19:30 ` Memnon Anon
  2010-09-23 20:10   ` Sebastian Rose
  2010-09-24  7:18 ` Carsten Dominik
  2 siblings, 1 reply; 5+ messages in thread
From: Memnon Anon @ 2010-09-23 19:30 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Sebastian Rose <sebastian_rose@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: Yet another way to use maps --- the light way
  2010-09-23 19:30 ` Memnon Anon
@ 2010-09-23 20:10   ` Sebastian Rose
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Rose @ 2010-09-23 20:10 UTC (permalink / raw)
  To: Memnon Anon; +Cc: emacs-orgmode

Memnon Anon <gegendosenfleisch@googlemail.com> writes:
> Hi,
>
> Sebastian Rose <sebastian_rose@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Yet another way to use maps --- the light way
  2010-09-23  8:17 Yet another way to use maps --- the light way Sebastian Rose
  2010-09-23 12:14 ` Carsten Dominik
  2010-09-23 19:30 ` Memnon Anon
@ 2010-09-24  7:18 ` Carsten Dominik
  2 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-09-24  7:18 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Emacs-orgmode mailing list


On Sep 23, 2010, at 10:17 AM, Sebastian Rose wrote:

> Hi,
>
>
> 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]]

I have added these examples to the manual.

Thanks!

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-24  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  8:17 Yet another way to use maps --- the light way Sebastian Rose
2010-09-23 12:14 ` Carsten Dominik
2010-09-23 19:30 ` Memnon Anon
2010-09-23 20:10   ` Sebastian Rose
2010-09-24  7:18 ` Carsten Dominik

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).