Google Static Maps in Roassal2
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!
Nice! Doru On Sat, Jul 5, 2014 at 4:36 AM, Sergio Maass <sergio.maass@gmail.com> wrote:
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!
-- www.tudorgirba.com "Every thing has its own flow"
Great !!! Envoyé de mon iPhone
Le 5 juil. 2014 à 04:36, Sergio Maass <sergio.maass@gmail.com> a écrit :
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.png>
The project can be found in http://www.smalltalkhub.com/mc/smaass/GMaps/main.
Any suggestions will be appreciated!
this is really nice. ObjectProfile people will get excited :) Stef On 5/7/14 04:36, Sergio Maass wrote:
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
Imágenes integradas 1
The project can be found in http://www.smalltalkhub.com/mc/smaass/GMaps/main.
Any suggestions will be appreciated!
Really cool!!!! 2014-07-05 10:18 GMT+02:00 stepharo <stepharo@free.fr>:
this is really nice.
ObjectProfile people will get excited :)
Stef
On 5/7/14 04:36, Sergio Maass wrote:
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!
-- *Guillaume Larcheveque*
We are very aware of Sergio work :) It would be great if you want to see some concrete scenarios or improvements with the integration of maps in Roassal. Sergio will be at ESUG. Cheers, Alexandre
Le 05-07-2014 à 4:18, stepharo <stepharo@free.fr> a écrit :
this is really nice.
ObjectProfile people will get excited :)
Stef
On 5/7/14 04:36, Sergio Maass wrote: 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
<mime-attachment.png>
The project can be found in http://www.smalltalkhub.com/mc/smaass/GMaps/main.
Any suggestions will be appreciated!
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/
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/
participants (6)
-
Alexandre Bergel -
Guillaume Larcheveque -
Serge Stinckwich -
Sergio Maass -
stepharo -
Tudor Girba