@@ -235,10 +235,11 @@ GeoViewExamples class >> createTissotIndicatorCircles [
235235
236236 i := 1 .
237237 - 70 to: 70 by: 15 do: [ :lat |
238- - 180 to: 180 by: 15 do: [ :lon |
238+ - 180 to: 180 by: 15 do: [ :lon | | coordinates |
239+ coordinates := ( lat @ lon ) asAbsoluteCoordinates.
239240 circles add: (GeoCircle new key: i;
240- absoluteCoordinates: ( lat @ lon ) asAbsoluteCoordinates ;
241- fillStyle: (Color green alpha: 0.5 ) asSmockFillStyle;
241+ absoluteCoordinates: coordinates ;
242+ fillStyle: (Color green alpha: 0.25 ) asSmockFillStyle;
242243 strokeStyle: (Color green asSmockStrokeStyle width: 1 );
243244 radiusInMeters: radiusInM;
244245 yourself ).
@@ -636,19 +637,18 @@ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleHybrid [
636637{ #category : #' examples - tiles provider' }
637638GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleRoadmap [
638639 " This example show a map layer (assuming an internet connection to default url of google"
639-
640+
640641 | element layer |
641642 element := GeoViewElement new .
642-
643- element maxScaleInMeters : element maxScaleInMeters * 8 .
644-
643+
644+ element maxScale : element maxScale * 8 .
645+
645646 " add carto layer"
646647 layer := GeoViewMapTilesLayer newWithGoogle name: ' Tiles Layer' .
647648 layer tilesProvider beRoadmapType.
648649 element addLayer: layer.
649650
650651 ^ self openViewInWindow: element
651-
652652]
653653
654654{ #category : #' examples - tiles provider' }
@@ -658,7 +658,7 @@ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleRoadsOnly [
658658 | element layer |
659659 element := GeoViewElement new .
660660
661- element maxScaleInMeters : element maxScale * 8 .
661+ element maxScale : element maxScale * 8 .
662662
663663 " add carto layer"
664664 layer := GeoViewMapTilesLayer newWithGoogle name: ' Tiles Layer' .
@@ -671,54 +671,51 @@ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleRoadsOnly [
671671{ #category : #' examples - tiles provider' }
672672GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleSatellite [
673673 " This example show a map layer (assuming an internet connection to default url of google"
674-
674+
675675 | element layer |
676676 element := GeoViewElement new .
677-
678- element maxScaleInMeters : element maxScaleInMeters * 8 .
679-
677+
678+ element maxScale : element maxScale * 8 .
679+
680680 " add carto layer"
681681 layer := GeoViewMapTilesLayer newWithGoogle name: ' Tiles Layer' .
682682 element addLayer: layer.
683683
684684 ^ self openViewInWindow: element
685-
686685]
687686
688687{ #category : #' examples - tiles provider' }
689688GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleTerrain [
690689 " This example show a map layer (assuming an internet connection to default url of google"
691-
690+
692691 | element layer |
693692 element := GeoViewElement new .
694-
695- element maxScaleInMeters : element maxScaleInMeters * 8 .
696-
693+
694+ element maxScale : element maxScale * 8 .
695+
697696 " add carto layer"
698697 layer := GeoViewMapTilesLayer newWithGoogle name: ' Tiles Layer' .
699698 layer tilesProvider beTerrainType.
700699 element addLayer: layer.
701700
702701 ^ self openViewInWindow: element
703-
704702]
705703
706704{ #category : #' examples - tiles provider' }
707705GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingGoogleTerrainOnly [
708706 " This example show a map layer (assuming an internet connection to default url of google"
709-
707+
710708 | element layer |
711709 element := GeoViewElement new .
712-
713- element maxScaleInMeters : element maxScaleInMeters * 8 .
714-
710+
711+ element maxScale : element maxScale * 8 .
712+
715713 " add carto layer"
716714 layer := GeoViewMapTilesLayer newWithGoogle name: ' Tiles Layer' .
717715 layer tilesProvider beTerrainOnlyType.
718716 element addLayer: layer.
719717
720718 ^ self openViewInWindow: element
721-
722719]
723720
724721{ #category : #' examples - tiles provider' }
@@ -728,7 +725,7 @@ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingLocal [
728725 | element layer |
729726 element := GeoViewElement new .
730727
731- element maxScaleInMeters : element maxScale * 8 .
728+ element maxScale : element maxScale * 8 .
732729
733730 " add carto layer"
734731 layer := GeoViewMapTilesLayer newWithLocalDirectory name:
@@ -754,14 +751,29 @@ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingOSM [
754751 ^ self openViewInWindow: element
755752]
756753
754+ { #category : #' examples - tiles provider' }
755+ GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingOSMWithMercatorProjection [
756+ " This example show a map layer (assuming an internet connection to default url open street map"
757+
758+ | element layer |
759+ element := GeoViewElement new .
760+ element maxScale: element maxScale * 8 .
761+
762+ " add carto layer"
763+ layer := GeoViewMapTilesLayer new name: ' Tiles Layer' .
764+ element addLayer: layer.
765+
766+ ^ self openViewInWindow: element
767+ ]
768+
757769{ #category : #' examples - tiles provider' }
758770GeoViewExamples class >> exampleGeoViewWithCartoTilesLayerUsingOSMWithSmallTileSize [
759771 " This example show a map layer (assuming an internet connection to default url open street map"
760772
761773 | element layer |
762774 element := GeoViewElement new .
763775
764- element maxScaleInMeters : element maxScale * 8 .
776+ element maxScale : element maxScale * 8 .
765777
766778 " add carto layer"
767779 layer := GeoViewMapTilesLayer new name: ' Tiles Layer' .
@@ -1113,7 +1125,7 @@ GeoViewExamples class >> exampleTissotIndicatorMercator [
11131125
11141126 | element objects |
11151127 element := GeoViewUtils createGeoViewForGeoObjects.
1116- element mapProjection: GeoViewMercatorProjection new . " by default "
1128+ element mapProjection: GeoViewMercatorProjection new .
11171129 " laborde: better to have a vectorial map to considere the deformation because tiles are not available for all projections"
11181130
11191131 " create sample datas"
@@ -1133,7 +1145,7 @@ GeoViewExamples class >> exampleTissotIndicatorUTM [
11331145 " warning before opening"
11341146 (UIManager default
11351147 confirm:
1136- ' This Tissot indicator example using a not finalized UTM Projection, it can works but without stability.
1148+ ' This Tissot indicator example using a work in progress UTM Projection, it can works but with glitchs and without stability.
11371149 Start ?'
11381150 label: ' GeoView - Work in progress' ) ifFalse: [ ^ self ].
11391151
@@ -1149,6 +1161,23 @@ GeoViewExamples class >> exampleTissotIndicatorUTM [
11491161
11501162]
11511163
1164+ { #category : #' examples - projections' }
1165+ GeoViewExamples class >> exampleTissotIndicatorWebMercator [
1166+ " This example implement the indicator of Tissot (Nicolas August) for a projection, this indicator indicate the level of deformation of the selection projection"
1167+
1168+ | element objects |
1169+ element := GeoViewUtils createGeoViewForGeoObjects.
1170+ " element mapProjection: GeoViewWebMercatorProjection new." " by default"
1171+ " laborde: better to have a vectorial map to considere the deformation because tiles are not available for all projections"
1172+
1173+ " create sample datas"
1174+ objects := self createTissotIndicatorCircles.
1175+ element addObjects: objects.
1176+
1177+ ^ self openViewInWindow: element
1178+
1179+ ]
1180+
11521181{ #category : #' examples - dshapeslayer' }
11531182GeoViewExamples class >> exampleVisibilityDShapesLayer [
11541183
0 commit comments