Sorry wrong mailing-list ;-) On Sat, Jul 5, 2014 at 2:25 PM, Serge Stinckwich <serge.stinckwich@gmail.com
wrote:
Quelque chose de très intéressant avec Pharo/Roassal.
Je pense qu'il y aurait moyen de faire quelque chose de sympa avec ce qu'à déjà fait Pierre-Yves.
Pierre-Yves tu serais partant ?
A+
---------- Forwarded message ---------- From: Sergio Maass <sergio.maass@gmail.com> Date: Sat, Jul 5, 2014 at 4:36 AM Subject: [Pharo-dev] Google Static Maps in Roassal2 To: pharo-dev@lists.pharo.org
Hello!
I created this tiny project for querying Google's Geocoding and Static Maps APIs. The maps are turned into Roassal2 elements with the map as a shape.
Below is a sample using the names of some stations of Santiago's subway network, marking their locations and drawing the path between them.
|v map linea1 linea2 linea5 metrificar | metrificar := [ :s | 'Metro ', s, ', Santiago Chile' ].
linea1 := #( 'Salvador' 'Baquedano' 'Universidad Catolica' 'Santa Lucia' 'Universidad de Chile' 'La Moneda' 'Los Heroes' 'Republica' 'Union Latino Americana' 'Estacion Central') collect: [ :s | (GoogleMaps geocode: (metrificar value: s)) location ].
linea2 := #( 'Cerro Blanco' 'Patronato' 'Puente Cal y Canto' 'Santa Ana' 'Los Heroes' 'Toesca' 'Parque O Higgins') collect: [ :s | metrificar value: s ].
linea5 := #( 'Parque Bustamante' 'Baquedano' 'Bellas Artes' 'Plaza de Armas' 'Santa Ana' 'Cumming' 'Quinta Normal') collect: [ :s | metrificar value: s ].
v := RTView new. map := StaticMap new hybrid. map addMarkers on: linea1; color: 'red'. map addPath points: linea1; color: 'red'.
map addMarkers on: linea2; color: 'yellow'. map addPath points: linea2; color: 'yellow'. map addMarkers on: linea5; color: 'green'. map addPath points: linea5; color: 'green'. v add: map getMap @ RTDraggable. v open
[image: Imágenes integradas 1]
The project can be found in http://www.smalltalkhub.com/mc/smaass/GMaps/main.
Any suggestions will be appreciated!
-- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
-- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/