Re: [NTG-context] include google maps in context document
Hi, On 3 May 2017 at 23:12, DesdeChaves wrote: > Dear Sirs > > I need to justify my displacements from my school to the various companies > where I have students in training. For this I must include in my report a > gloogle maps image with the path and the distance covered. > > In the browse o found all the information that I need. For example, with an > url address like: > > http://maps.googleapis.com/maps/api/distancematrix/json?origins=Seattle=San+Francisco=driving=false > > i get a json response, but not the google map image. > > If I try an address like this > "https://www.google.pt/maps/dir/Chaves/Valpaços/; I found all information in > the browser, but I need to include it in my context document report. > > Anybody know a simply way to make this work or this is a too hard task for > now. This is not really a ConTeXt-related question, but ConTeXt can include any image you can feed to it, and potentially fetch images from URL on the fly. So you first need to figure out how to get the image you want. See: https://developers.google.com/maps/documentation/static-maps/intro You first need your own API_KEY. If you have problems with the interface, ask on stackexchange or elsewhere. If you have problems with making as automatic workflow as possible (once you know how to get your PNGs exactly), you may ask here. But have the rest of the details ready. ConTeXt supports "natively" drawing OpenStreet Maps, but I doubt it would work in your case. Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
On 4 May 2017 at 13:30, DesdeChaves wrote: > > Can you provide me a example (or a link) for use OpenStreet Maps in context? > > Perhaps I can track my displacements with my phone and superimpose those > tracks with the OpenStreet Maps. See the attachment (you need to extract the osm file before running context). Mojca bachotex.tex Description: TeX document bachotex.osm.gz Description: GNU Zip compressed data bachotex.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
Am Wed, 3 May 2017 22:12:54 +0100 schrieb DesdeChaves: > For this I must include in my report a > gloogle maps image with the path and the distance covered. [...] > Anybody know a simply way to make this work or this is a too hard task for > now. There is a LaTeX-Package called getmap. http://www.ctan.org/pkg/getmap It's documentation contains also some remark about how to get routing. Perhaps you find something useful in it. -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Module for Markdown: any volunteer to make a ConTeXt interface?
Hi, There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live. It theoretically works for ConTeXt (the output is perfectly usable), but it needs a cleanup of the user interface to turn the options on and off. For example, it would be nice to use something like \setupmarkdown [fencedCode=true] rather than \def\markdownOptionFencedCode{true} Is anyone willing to look into the code and help the author fix the interface? (I can add it to our distribution if needed.) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] expansion in widgets
Hans, I have the following sample: \setupinteraction[state=start] \starttext \setupfield [TextSetup] [width=.5\textwidth, height=.5\textwidth, frame=off] \definefield [SomeField] [text] [TextSetup] [\input knuth] \field[SomeField] \stoptext Would it be possible to have expansion for widgets? It would be extremely useful and also similar to \enabledirectives[references.bookmarks.preroll] and \enabledirectives[interaction.identity.preroll]. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
Am 2017-05-04 um 13:46 schrieb Mojca Miklavec: > On 4 May 2017 at 13:30, DesdeChaves wrote: >> >> Can you provide me a example (or a link) for use OpenStreet Maps in context? >> >> Perhaps I can track my displacements with my phone and superimpose those >> tracks with the OpenStreet Maps. > > See the attachment (you need to extract the osm file before running context). Wow, that looks like something I need, thank you so much! Why didn’t anyone publish this as a module or on the wiki? Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
On 4 May 2017 at 15:20, Ulrike Fischerwrote: > Am Wed, 3 May 2017 22:12:54 +0100 schrieb DesdeChaves: > >> For this I must include in my report a >> gloogle maps image with the path and the distance covered. > > [...] > >> Anybody know a simply way to make this work or this is a too hard task for >> now. > > There is a LaTeX-Package called getmap. > http://www.ctan.org/pkg/getmap > It's documentation contains also some remark about how to get > routing. Perhaps you find something useful in it. Thank you. This looks like something worth porting to ConTeXt :) Even if implemented from scratch, the package could be used to borrow the hacks. The syntax is pretty clean (and already relatively "ConTeXt"-ish): \getmap[file=berlin, mode=gm, language=de, scale=2, 8 xsize=400, ysize=600,...] To Jorge: I would probably use LaTeX to fetch the maps and then include the images into ConTeXt as the first workaround if you need the maps in a ConTeXt document and need a fast solution. Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
Thanks to all for your support. For now I use Latex for making the images (thanks to Ulrike and Mojca), but my heart is on OpenStreet Maps + luatex + Metapost solution (thanks to Hans et al). Perhaps soon anybody can play with it. For now it lacks a labels level and it's to hard add particular gps tracks. Thank you very much to all. Jorge 2017-05-04 15:55 GMT+01:00 Mojca Miklavec: > On 4 May 2017 at 15:59, Henning Hraban Ramm wrote: > > Am 2017-05-04 um 13:46 schrieb Mojca Miklavec: > >> On 4 May 2017 at 13:30, DesdeChaves wrote: > >>> > >>> Can you provide me a example (or a link) for use OpenStreet Maps in > context? > >>> > >>> Perhaps I can track my displacements with my phone and superimpose > those > >>> tracks with the OpenStreet Maps. > >> > >> See the attachment (you need to extract the osm file before running > context). > > > > Wow, that looks like something I need, thank you so much! > > Why didn’t anyone publish this as a module or on the wiki? > > Blame me :( > > Hans wrote most of the code and told me to document it. > > Mojca > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > -- Atentamente DesdeChaves ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
On 4 May 2017 at 15:59, Henning Hraban Ramm wrote: > Am 2017-05-04 um 13:46 schrieb Mojca Miklavec: >> On 4 May 2017 at 13:30, DesdeChaves wrote: >>> >>> Can you provide me a example (or a link) for use OpenStreet Maps in context? >>> >>> Perhaps I can track my displacements with my phone and superimpose those >>> tracks with the OpenStreet Maps. >> >> See the attachment (you need to extract the osm file before running context). > > Wow, that looks like something I need, thank you so much! > Why didn’t anyone publish this as a module or on the wiki? Blame me :( Hans wrote most of the code and told me to document it. Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] include google maps in context document
Thanks for your support. Can you provide me a example (or a link) for use OpenStreet Maps in context? Perhaps I can track my displacements with my phone and superimpose those tracks with the OpenStreet Maps. Jorge 2017-05-04 11:26 GMT+01:00 Mojca Miklavec: > Hi, > > On 3 May 2017 at 23:12, DesdeChaves wrote: > > Dear Sirs > > > > I need to justify my displacements from my school to the various > companies > > where I have students in training. For this I must include in my report a > > gloogle maps image with the path and the distance covered. > > > > In the browse o found all the information that I need. For example, with > an > > url address like: > > > > http://maps.googleapis.com/maps/api/distancematrix/json? > origins=Seattle=San+Francisco=driving=false > > > > i get a json response, but not the google map image. > > > > If I try an address like this > > "https://www.google.pt/maps/dir/Chaves/Valpaços/; I found all > information in > > the browser, but I need to include it in my context document report. > > > > Anybody know a simply way to make this work or this is a too hard task > for > > now. > > This is not really a ConTeXt-related question, but ConTeXt can include > any image you can feed to it, and potentially fetch images from URL on > the fly. So you first need to figure out how to get the image you > want. > > See: > https://developers.google.com/maps/documentation/static-maps/intro > > You first need your own API_KEY. > > If you have problems with the interface, ask on stackexchange or > elsewhere. If you have problems with making as automatic workflow as > possible (once you know how to get your PNGs exactly), you may ask > here. But have the rest of the details ready. > > ConTeXt supports "natively" drawing OpenStreet Maps, but I doubt it > would work in your case. > > Mojca > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ -- Atentamente DesdeChaves ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___