@@ -1140,11 +1140,11 @@ GeoViewExamples class >> exampleWithDShapesLayer [
11401140 layer := GeoViewDShapesLayer new name: #shapes .
11411141 element addLayer: layer.
11421142
1143- " User circle (not projected )"
1143+ " User circle (considering measures are in cartesian coordinates )"
11441144 circle1 := (SmockDCircle key: #circle1 ) coordinates: (element mapProjection projLatLonToCart: AbsoluteCoordinates zero); radius: 1000000 ; strokeColor: Color green; strokeWidth: 2 .
11451145 layer addDShape: circle1.
11461146
1147- " Device circle"
1147+ " Device circle (considering measures are in screen coordinates) "
11481148 circle2 := (SmockDCircle key: #circle2 ) coordinates: 100 @100 ; radius: 100 ; strokeColor: Color yellow; strokeWidth: 2 ; setDrawModeDevice.
11491149 layer addDShape: circle2.
11501150
@@ -1363,6 +1363,32 @@ GeoViewExamples class >> exampleWithGeoObjectsUpdated [
13631363 ^ space
13641364]
13651365
1366+ { #category : #' examples - dshapeslayer' }
1367+ GeoViewExamples class >> exampleWithUserDrawModeImage [
1368+ " Display the pharo logo image of 32m x 32m on the Brest city"
1369+
1370+ | element layer image |
1371+ element := GeoViewElement new .
1372+ element addLayer: GeoViewMapTilesLayer newWithOpenStreetMap.
1373+
1374+ layer := GeoViewDShapesLayer new name: #shapes .
1375+ element addLayer: layer.
1376+
1377+ " User image (considering measures are in cartesian coordinates)"
1378+ image := (SmockDImage key: #image1 )
1379+ coordinates:
1380+ (element mapProjection projLatLonToCart:
1381+ AbsoluteCoordinates frBrest);
1382+ image: (self iconNamed: #pharo ); " this image is 32x32 pixels => 1 meter by pixel in user draw mode"
1383+ setDrawModeUser.
1384+ layer addDShape: image.
1385+
1386+ element geoCenter: AbsoluteCoordinates frBrest.
1387+ element scale: 200 .
1388+
1389+ ^ self openViewInWindow: element
1390+ ]
1391+
13661392{ #category : #' private - datas' }
13671393GeoViewExamples class >> largest50Cities [
13681394 " example: not realistic"
0 commit comments