On Thursday, September 5, 2019 at 10:14:15 PM UTC+8, Laurent wrote:
>
> This is utterly cool!
>
> If I may, I suggest to rebind up and down to page up and page down (or 
> even the converse, as "down" means to me "go downwards towards Earth"), use 
> the arrows to navigate NESW, and bind mouse scrolls to zooming too.
>

The map-snip% already uses the mouse wheel for zooming, but DrRacket binds 
those events to scroll the REPL window up and down, so the snip never 
receives these events -- this is the reason why I added the "up" and "down" 
keys.   The REPL example is just a side benefit of using snips for the map 
object, but for my own use, I put the map-snip% in a pasteboard% which I 
fully control, so the keyboard navigation is not an issue.  Perhaps I'll 
add some keymap% bindings for more general control of the map snip, so that 
users can bind whatever keys they prefer...
 

>
> A package containing a database of the positions of the major cities and 
> countries would be nice too :)
>


A general facility able to resolve location names to GPS coordinates would 
be a lot of work, and I don't have time for such a thing.  Sorry.

Alex.

 

> On Wed, Sep 4, 2019 at 12:50 PM Stephen De Gabrielle <spdega...@gmail.com 
> <javascript:>> wrote:
>
>> Dr Racket is amazing. Need to a demo of this and plot side by side. 
>>
>> DrRacket is so close to being an electronic lab notebook it’s almost 
>> painful....
>>
>> Stephen
>>
>> On Wed, 4 Sep 2019 at 12:20, Sage Gerard <sa...@sagegerard.com 
>> <javascript:>> wrote:
>>
>>> How cool is that! DrRacket's flexibility is pretty amazing 
>>>
>>>
>>>
>>> -------- Original Message --------
>>> On Sep 4, 2019, 5:41 AM, Alex Harsanyi < alexha...@gmail.com 
>>> <javascript:>> wrote:
>>>
>>>
>>>
>>> As part of another project, I had to update my map-widget to act as a 
>>> snip% so it can be inserted into a pasteboard%.   An unintended side 
>>> benefit of this work is that maps can now be embedded in the DrRacket REPL 
>>> -- this in itself is not very useful, but it does make for a cool demo, so 
>>> I thought I would record a video of it and share it here:  
>>> https://youtu.be/MrS0FG-X8DI
>>>
>>> Here is a screenshot too:
>>>
>>> [image: map-snip-demo.PNG]
>>>
>>>
>>> For those who want to try it out, you can install the map-widget 
>>> package, than type the following in the REPL:
>>>
>>>     (require map-widget)
>>>     (new map-snip%)
>>>
>>> Note that map tile download is not very fast, but the code does cache 
>>> all downloaded data locally, this means that once tiles are downloaded, 
>>> subsequent runs which show the same area will be fast.  In the linked video 
>>> you don't see any tiles being loaded, as I did a practice run before 
>>> recording it and all map data was locally available, making it load 
>>> instantly -- you can do that too if you run the code a second time.
>>>
>>> And in case you want to have a look at the code itself, it is here: 
>>> https://github.com/alex-hhh/map-widget
>>>
>>> Enjoy,
>>> Alex.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to racket...@googlegroups.com <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/fdc50657-4125-4c2f-b0a9-03bc701fe869%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/racket-users/fdc50657-4125-4c2f-b0a9-03bc701fe869%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to racket...@googlegroups.com <javascript:>.
>>>
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/IyQJpx7V3hwBoRhSKLdOfYxktKfIFtpP0_Wl5_be2mPSg6RIUSJQMQHR6tTBL6qr0FbY210RV2u9ksNrj1vbh_KS3Dh9GguXONj-slVw75s%3D%40sagegerard.com
>>>  
>>> <https://groups.google.com/d/msgid/racket-users/IyQJpx7V3hwBoRhSKLdOfYxktKfIFtpP0_Wl5_be2mPSg6RIUSJQMQHR6tTBL6qr0FbY210RV2u9ksNrj1vbh_KS3Dh9GguXONj-slVw75s%3D%40sagegerard.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> -- 
>> ----
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/CAGHj7-JFAK_gkNRCRdb4z%3Dq%2B76ivMxz5Gfct%3DQjgXxDRuTLDiA%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/racket-users/CAGHj7-JFAK_gkNRCRdb4z%3Dq%2B76ivMxz5Gfct%3DQjgXxDRuTLDiA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/be59b6ee-9092-49ed-8ced-8fbb11ca2418%40googlegroups.com.

Reply via email to