ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Tony Garnock-Jones-5
Hi all,

Today I've been hacking on a thing called TiledMaps:

        http://squeaksource.com/TiledMaps.html

The package can load and cache static, prerendered map tiles from a
variety of sources including OpenStreetMaps, Bing Maps, and so on.

It includes a geocoder query service which maps free-text queries to
regions of the planet's surface. The service can be backed by the
Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
the Google geocoder, and so on.

Selection of tilesets is independent of selection of geocoder, so you
can mix and match.

The package includes a "slippy map" morph called TiledMapMorph, that
allows interaction with a map using the mouse. It includes a few hooks
for EToys, too, so EToys scripting of the map is possible.

I've recorded a short (< 10 min) demo video showing the package in action:

        https://youtu.be/T_TDhAAxuy0

Cheers,
  Tony

PS. All the Bing services require an API key. You can get one of your
own from https://www.bingmapsportal.com/. Included in the package are a
few other tile sources and geocoders that need API keys as well - you'll
need to check the websites and terms&conditions for each service you
want to use.

PPS. In particular, Google's terms&conditions explicitly forbid
downloading map tiles without going through their Javascript API. The
package honours this restriction.

Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Herbert König
Hey Tony,


that's sooo cool, I'll send it with a big smiley to some colleagues
passionate for other languages.


Thanks,


Herbert


Am 11.02.2018 um 20:07 schrieb Tony Garnock-Jones:

> Hi all,
>
> Today I've been hacking on a thing called TiledMaps:
>
> http://squeaksource.com/TiledMaps.html
>
> The package can load and cache static, prerendered map tiles from a
> variety of sources including OpenStreetMaps, Bing Maps, and so on.
>
> It includes a geocoder query service which maps free-text queries to
> regions of the planet's surface. The service can be backed by the
> Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
> the Google geocoder, and so on.
>
> Selection of tilesets is independent of selection of geocoder, so you
> can mix and match.
>
> The package includes a "slippy map" morph called TiledMapMorph, that
> allows interaction with a map using the mouse. It includes a few hooks
> for EToys, too, so EToys scripting of the map is possible.
>
> I've recorded a short (< 10 min) demo video showing the package in action:
>
> https://youtu.be/T_TDhAAxuy0
>
> Cheers,
>    Tony
>
> PS. All the Bing services require an API key. You can get one of your
> own from https://www.bingmapsportal.com/. Included in the package are a
> few other tile sources and geocoders that need API keys as well - you'll
> need to check the websites and terms&conditions for each service you
> want to use.
>
> PPS. In particular, Google's terms&conditions explicitly forbid
> downloading map tiles without going through their Javascript API. The
> package honours this restriction.
>


Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

marcel.taeumel
In reply to this post by Tony Garnock-Jones-5
Woah, cool! :) Thank you!

+1 for the screencast. :-D

Best,
Marcel

Am 11.02.2018 20:07:10 schrieb Tony Garnock-Jones <[hidden email]>:

Hi all,

Today I've been hacking on a thing called TiledMaps:

http://squeaksource.com/TiledMaps.html

The package can load and cache static, prerendered map tiles from a
variety of sources including OpenStreetMaps, Bing Maps, and so on.

It includes a geocoder query service which maps free-text queries to
regions of the planet's surface. The service can be backed by the
Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
the Google geocoder, and so on.

Selection of tilesets is independent of selection of geocoder, so you
can mix and match.

The package includes a "slippy map" morph called TiledMapMorph, that
allows interaction with a map using the mouse. It includes a few hooks
for EToys, too, so EToys scripting of the map is possible.

I've recorded a short (< 10="" min)="" demo="" video="" showing="" the="" package="" in="">

https://youtu.be/T_TDhAAxuy0

Cheers,
Tony

PS. All the Bing services require an API key. You can get one of your
own from https://www.bingmapsportal.com/. Included in the package are a
few other tile sources and geocoders that need API keys as well - you'll
need to check the websites and terms&conditions for each service you
want to use.

PPS. In particular, Google's terms&conditions explicitly forbid
downloading map tiles without going through their Javascript API. The
package honours this restriction.



jrm
Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

jrm
Tony,

This is quite an interesting application. Great work!

What does the future hold ?

-jrm

On Mon, Feb 12, 2018 at 5:14 AM, Marcel Taeumel <[hidden email]> wrote:
Woah, cool! :) Thank you!

+1 for the screencast. :-D

Best,
Marcel

Am 11.02.2018 20:07:10 schrieb Tony Garnock-Jones <[hidden email]>:

Hi all,

Today I've been hacking on a thing called TiledMaps:

http://squeaksource.com/TiledMaps.html

The package can load and cache static, prerendered map tiles from a
variety of sources including OpenStreetMaps, Bing Maps, and so on.

It includes a geocoder query service which maps free-text queries to
regions of the planet's surface. The service can be backed by the
Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
the Google geocoder, and so on.

Selection of tilesets is independent of selection of geocoder, so you
can mix and match.

The package includes a "slippy map" morph called TiledMapMorph, that
allows interaction with a map using the mouse. It includes a few hooks
for EToys, too, so EToys scripting of the map is possible.

I've recorded a short (< 10="" min)="" demo="" video="" showing="" the="" package="" in="">

https://youtu.be/T_TDhAAxuy0

Cheers,
Tony

PS. All the Bing services require an API key. You can get one of your
own from https://www.bingmapsportal.com/. Included in the package are a
few other tile sources and geocoders that need API keys as well - you'll
need to check the websites and terms&conditions for each service you
want to use.

PPS. In particular, Google's terms&conditions explicitly forbid
downloading map tiles without going through their Javascript API. The
package honours this restriction.







Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Tony Garnock-Jones-5
On 02/12/2018 07:48 PM, John-Reed Maffeo wrote:
> This is quite an interesting application. Great work!

Thanks!

I felt that the use of `LRUCache` with `Promise`s for the background
tile-loading worked out pretty well.

> What does the future hold ?

For this code? It's finished, for now. If I find myself using it much,
I'm sure I'll find things wrong with it that need fixing. (One omission
is an API for gaining access to attribution/credit information that goes
along with the tiles. At present it's *just* enough plumbing to get the
tiles out to the screen.) (Another omission is scroll-wheel support on
TiledMapMorph.) (A third is being able to show all results to a search,
not just the first/best one.)

For me? I'm working on programming-language designs incorporating ideas
from the Actor model and from tuplespaces. :-)

Cheers,
  Tony

Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Chris Muller-3
In reply to this post by marcel.taeumel
Fantastic!  I will definitely try to integrate this into my KML framework!

On Mon, Feb 12, 2018 at 2:44 AM, Marcel Taeumel <[hidden email]> wrote:

> Woah, cool! :) Thank you!
>
> +1 for the screencast. :-D
>
> Best,
> Marcel
>
> Am 11.02.2018 20:07:10 schrieb Tony Garnock-Jones
> <[hidden email]>:
>
> Hi all,
>
> Today I've been hacking on a thing called TiledMaps:
>
> http://squeaksource.com/TiledMaps.html
>
> The package can load and cache static, prerendered map tiles from a
> variety of sources including OpenStreetMaps, Bing Maps, and so on.
>
> It includes a geocoder query service which maps free-text queries to
> regions of the planet's surface. The service can be backed by the
> Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
> the Google geocoder, and so on.
>
> Selection of tilesets is independent of selection of geocoder, so you
> can mix and match.
>
> The package includes a "slippy map" morph called TiledMapMorph, that
> allows interaction with a map using the mouse. It includes a few hooks
> for EToys, too, so EToys scripting of the map is possible.
>
> I've recorded a short (< 10="" min)="" demo="" video="" showing="" the=""
> package="" in="">
>
> https://youtu.be/T_TDhAAxuy0
>
> Cheers,
> Tony
>
> PS. All the Bing services require an API key. You can get one of your
> own from https://www.bingmapsportal.com/. Included in the package are a
> few other tile sources and geocoders that need API keys as well - you'll
> need to check the websites and terms&conditions for each service you
> want to use.
>
> PPS. In particular, Google's terms&conditions explicitly forbid
> downloading map tiles without going through their Javascript API. The
> package honours this restriction.
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Eliot Miranda-2
In reply to this post by Tony Garnock-Jones-5
Hi Tony,

    would you be happy to see your video linked to, with prominent billing, from a suitable page on the squeak.org site?

> On Feb 11, 2018, at 11:07 AM, Tony Garnock-Jones <[hidden email]> wrote:
>
> Hi all,
>
> Today I've been hacking on a thing called TiledMaps:
>
>    http://squeaksource.com/TiledMaps.html
>
> The package can load and cache static, prerendered map tiles from a
> variety of sources including OpenStreetMaps, Bing Maps, and so on.
>
> It includes a geocoder query service which maps free-text queries to
> regions of the planet's surface. The service can be backed by the
> Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
> the Google geocoder, and so on.
>
> Selection of tilesets is independent of selection of geocoder, so you
> can mix and match.
>
> The package includes a "slippy map" morph called TiledMapMorph, that
> allows interaction with a map using the mouse. It includes a few hooks
> for EToys, too, so EToys scripting of the map is possible.
>
> I've recorded a short (< 10 min) demo video showing the package in action:
>
>    https://youtu.be/T_TDhAAxuy0
>
> Cheers,
>  Tony
>
> PS. All the Bing services require an API key. You can get one of your
> own from https://www.bingmapsportal.com/. Included in the package are a
> few other tile sources and geocoders that need API keys as well - you'll
> need to check the websites and terms&conditions for each service you
> want to use.
>
> PPS. In particular, Google's terms&conditions explicitly forbid
> downloading map tiles without going through their Javascript API. The
> package honours this restriction.

Eliot
_,,,^..^,,,_ (phone)

Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Eliot Miranda-2


> On Feb 13, 2018, at 9:16 AM, Eliot Miranda <[hidden email]> wrote:
>
> Hi Tony,
>
>    would you be happy to see your video linked to, with prominent billing, from a suitable page on the squeak.org site?

Also it would be great so see an article, perhaps a blog post, that shows how promises simplified the implementation and how promises are "merely" a piece of normal Smalltalk programming that did not require changing the language to integrate.

>
>> On Feb 11, 2018, at 11:07 AM, Tony Garnock-Jones <[hidden email]> wrote:
>>
>> Hi all,
>>
>> Today I've been hacking on a thing called TiledMaps:
>>
>>   http://squeaksource.com/TiledMaps.html
>>
>> The package can load and cache static, prerendered map tiles from a
>> variety of sources including OpenStreetMaps, Bing Maps, and so on.
>>
>> It includes a geocoder query service which maps free-text queries to
>> regions of the planet's surface. The service can be backed by the
>> Nominatim service (associated with OpenStreetMaps), the Bing geocoder,
>> the Google geocoder, and so on.
>>
>> Selection of tilesets is independent of selection of geocoder, so you
>> can mix and match.
>>
>> The package includes a "slippy map" morph called TiledMapMorph, that
>> allows interaction with a map using the mouse. It includes a few hooks
>> for EToys, too, so EToys scripting of the map is possible.
>>
>> I've recorded a short (< 10 min) demo video showing the package in action:
>>
>>   https://youtu.be/T_TDhAAxuy0
>>
>> Cheers,
>> Tony
>>
>> PS. All the Bing services require an API key. You can get one of your
>> own from https://www.bingmapsportal.com/. Included in the package are a
>> few other tile sources and geocoders that need API keys as well - you'll
>> need to check the websites and terms&conditions for each service you
>> want to use.
>>
>> PPS. In particular, Google's terms&conditions explicitly forbid
>> downloading map tiles without going through their Javascript API. The
>> package honours this restriction.
>
> Eliot
> _,,,^..^,,,_ (phone)

Reply | Threaded
Open this post in threaded view
|

Re: ANN: TiledMaps library - OpenStreetMaps, Bing Maps, Thunderforest maps and so on

Tony Garnock-Jones-5
In reply to this post by Eliot Miranda-2
Hi Eliot,

On 02/13/2018 05:16 PM, Eliot Miranda wrote:
> would you be happy to see your video linked to, with prominent
> billing, from a suitable page on the squeak.org site?

Sure, that'd be cool!

> Also it would be great so see an article, perhaps a blog post, that
> shows how promises simplified the implementation and how promises are
> "merely" a piece of normal Smalltalk programming that did not require
> changing the language to integrate.
That's a good idea, too.

I don't know if "not changing the language" is very impressive, though?
Javascript's promises don't need language changes either; and
implementing Squeak-like promises for other languages would be similar.

But the heart of the change from "loading tiles blocks the UI and gets
incredibly annoying" to "smooth scrolling with lazy loading" was very
small, and that might be worth an article.

It was, at heart, this change: from

    ^ tileSource mapTileAt: point zoom: zoom

to

    | p |
    p := Promise new.
    [ p resolveWith: (tileSource mapTileAt: point zoom: zoom) ] fork.
    ^ p

plus adding

    self tilesDo: [:tile :formPromise |
      formPromise whenResolved: [ self changed ] ].

whenever the coordinates to be shown were changed, and using
`formPromise value` instead of `form` in `drawTilesOn:`, rendering a
loading tile when the promise wasn't ready yet.

The LRUCache then stored Promises, which were reused frequently until
the cache evicted them, instead of storing Forms directly.

Tony