22class LocationWindowInteractionExample {
27 LocationWindowInteractionExample() {
28 _demonstrateLocationWindowInteractionMethods();
34 void _demonstrateLocationWindowInteractionMethods() {
35 print(
"=== LocationWindowInteraction Example ===");
37 _demonstrateGestureProperties();
38 _demonstratePickProperties();
39 _demonstratePickMethods();
40 _demonstrateInputListeners();
41 _demonstratePickListeners();
48 void _demonstrateGestureProperties() {
49 print(
"--- Gesture Properties ---");
52 print(
"LocationWindow not available yet");
59 print(
"Set stick to border to true");
65 print(
"Set rotate gesture enabled to true");
71 print(
"Set tilt gestures enabled to true");
77 print(
"Set scroll gestures enabled to true");
83 print(
"Set zoom gestures enabled to true");
87 List<Map<String, dynamic>> gestureTests = [
88 {
"rotate":
true,
"tilt":
true,
"scroll":
true,
"zoom":
true,
"stick":
true},
89 {
"rotate":
false,
"tilt":
true,
"scroll":
true,
"zoom":
true,
"stick":
false},
90 {
"rotate":
true,
"tilt":
false,
"scroll":
true,
"zoom":
false,
"stick":
true},
91 {
"rotate":
false,
"tilt":
false,
"scroll":
false,
"zoom":
false,
"stick":
false},
94 for (
int i = 0; i < gestureTests.length; i++) {
95 Map<String, dynamic> test = gestureTests[i];
101 print(
"Gesture test $i: Rotate=${test["rotate
"]}, Tilt=${test["tilt
"]}, Scroll=${test["scroll
"]}, Zoom=${test["zoom
"]}, Stick=${test["stick
"]}");
108 void _demonstratePickProperties() {
109 print(
"--- Pick Properties ---");
112 print(
"LocationWindow not available yet");
119 print(
"Set pick radius to 10.0 pixels");
123 List<double> pickRadiusTests = [5.0, 10.0, 20.0, 50.0, 100.0];
125 for (
int i = 0; i < pickRadiusTests.length; i++) {
126 double radius = pickRadiusTests[i];
128 print(
"Pick radius test $i: ${radius} pixels");
135 void _demonstratePickMethods() {
136 print(
"--- Pick Methods ---");
139 print(
"LocationWindow not available yet");
145 math.Point<
double> screenPoint = math.Point<
double>(100.0, 200.0);
147 print(
"Picked map object at screen position (${screenPoint.x}, ${screenPoint.y})");
152 math.Point<
double> featurePoint = math.Point<
double>(150.0, 250.0);
154 print(
"Picked map feature at screen position (${featurePoint.x}, ${featurePoint.y})");
158 List<math.Point<
double>> pickTests = [
159 math.Point<
double>(50.0, 50.0),
160 math.Point<
double>(200.0, 300.0),
161 math.Point<
double>(400.0, 100.0),
162 math.Point<
double>(300.0, 400.0),
165 for (
int i = 0; i < pickTests.length; i++) {
166 math.Point<
double> point = pickTests[i];
169 print(
"Pick test $i: Object and feature at (${point.x}, ${point.y})");
176 void _demonstrateInputListeners() {
177 print(
"--- Input Listeners ---");
180 print(
"LocationWindow not available yet");
188 print(
"Added input listener");
195 print(
"Removed input listener");
199 List<InputListener> listeners = [
205 for (
int i = 0; i < listeners.length; i++) {
207 print(
"Added input listener $i");
210 for (
int i = 0; i < listeners.length; i++) {
212 print(
"Removed input listener $i");
219 void _demonstratePickListeners() {
220 print(
"--- Pick Listeners ---");
223 print(
"LocationWindow not available yet");
231 print(
"Added pick listener");
235 List<PickListener> listeners = [
241 for (
int i = 0; i < listeners.length; i++) {
243 print(
"Added pick listener $i");
246 for (
int i = 0; i < listeners.length; i++) {
249 print(
"Removed pick listener $i");
266 print(
"LocationWindowInteraction example cleanup completed");