@maccesar/titools 2.10.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/AGENTS-VERCEL-RESEARCH.md +23 -12
  2. package/README.md +81 -182
  3. package/agents/ti-pro.md +8 -14
  4. package/lib/cleanup.js +13 -0
  5. package/lib/commands/skills.js +2 -1
  6. package/lib/commands/update.js +4 -1
  7. package/lib/config.js +9 -11
  8. package/lib/platform.js +1 -1
  9. package/package.json +2 -3
  10. package/skills/purgetss/SKILL.md +12 -0
  11. package/skills/purgetss/references/animation-advanced.md +0 -9
  12. package/skills/purgetss/references/app-branding.md +20 -0
  13. package/skills/purgetss/references/appearance-module.md +85 -27
  14. package/skills/purgetss/references/apply-directive.md +60 -0
  15. package/skills/purgetss/references/arbitrary-values.md +41 -0
  16. package/skills/purgetss/references/cli-commands.md +52 -17
  17. package/skills/purgetss/references/custom-rules.md +36 -19
  18. package/skills/purgetss/references/customization-deep-dive.md +37 -15
  19. package/skills/purgetss/references/grid-layout.md +45 -26
  20. package/skills/purgetss/references/icon-fonts.md +27 -25
  21. package/skills/purgetss/references/installation-setup.md +28 -2
  22. package/skills/purgetss/references/ios-large-titles.md +31 -15
  23. package/skills/purgetss/references/multi-density-images.md +57 -0
  24. package/skills/purgetss/references/opacity-modifier.md +11 -2
  25. package/skills/purgetss/references/semantic-colors.md +44 -1
  26. package/skills/purgetss/references/tikit-components.md +1 -3
  27. package/skills/alloy-guides/SKILL.md +0 -190
  28. package/skills/alloy-guides/references/CLI_TASKS.md +0 -233
  29. package/skills/alloy-guides/references/CONCEPTS.md +0 -171
  30. package/skills/alloy-guides/references/CONTROLLERS.md +0 -279
  31. package/skills/alloy-guides/references/MODELS.md +0 -1214
  32. package/skills/alloy-guides/references/PURGETSS.md +0 -46
  33. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +0 -235
  34. package/skills/alloy-guides/references/VIEWS_STYLES.md +0 -375
  35. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
  36. package/skills/alloy-guides/references/VIEWS_XML.md +0 -581
  37. package/skills/alloy-guides/references/WIDGETS.md +0 -160
  38. package/skills/alloy-howtos/SKILL.md +0 -181
  39. package/skills/alloy-howtos/references/best_practices.md +0 -121
  40. package/skills/alloy-howtos/references/cli_reference.md +0 -230
  41. package/skills/alloy-howtos/references/config_files.md +0 -158
  42. package/skills/alloy-howtos/references/custom_tags.md +0 -148
  43. package/skills/alloy-howtos/references/debugging_troubleshooting.md +0 -78
  44. package/skills/alloy-howtos/references/samples.md +0 -156
  45. package/skills/ti-api/SKILL.md +0 -109
  46. package/skills/ti-api/references/api-android.md +0 -675
  47. package/skills/ti-api/references/api-app-platform.md +0 -636
  48. package/skills/ti-api/references/api-core.md +0 -764
  49. package/skills/ti-api/references/api-data-network.md +0 -641
  50. package/skills/ti-api/references/api-media.md +0 -655
  51. package/skills/ti-api/references/api-modules-ble-bluetooth.md +0 -657
  52. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +0 -411
  53. package/skills/ti-api/references/api-modules-map.md +0 -632
  54. package/skills/ti-api/references/api-modules-nfc.md +0 -725
  55. package/skills/ti-api/references/api-modules-social-misc.md +0 -526
  56. package/skills/ti-api/references/api-services.md +0 -700
  57. package/skills/ti-api/references/api-ui-android.md +0 -499
  58. package/skills/ti-api/references/api-ui-extras.md +0 -702
  59. package/skills/ti-api/references/api-ui-ios-animator.md +0 -378
  60. package/skills/ti-api/references/api-ui-ios.md +0 -756
  61. package/skills/ti-api/references/api-ui-lists.md +0 -581
  62. package/skills/ti-api/references/api-ui-text-input.md +0 -607
  63. package/skills/ti-api/references/api-ui-views.md +0 -572
  64. package/skills/ti-api/references/api-ui-windows-navigation.md +0 -676
  65. package/skills/ti-api/references/api-xml-global.md +0 -743
  66. package/skills/ti-guides/SKILL.md +0 -75
  67. package/skills/ti-guides/references/advanced-data-and-images.md +0 -155
  68. package/skills/ti-guides/references/android-manifest.md +0 -97
  69. package/skills/ti-guides/references/app-distribution.md +0 -373
  70. package/skills/ti-guides/references/application-frameworks.md +0 -366
  71. package/skills/ti-guides/references/cli-reference.md +0 -700
  72. package/skills/ti-guides/references/coding-best-practices.md +0 -150
  73. package/skills/ti-guides/references/commonjs-advanced.md +0 -279
  74. package/skills/ti-guides/references/hello-world.md +0 -99
  75. package/skills/ti-guides/references/hyperloop-native-access.md +0 -458
  76. package/skills/ti-guides/references/javascript-primer.md +0 -402
  77. package/skills/ti-guides/references/reserved-words.md +0 -36
  78. package/skills/ti-guides/references/resources.md +0 -172
  79. package/skills/ti-guides/references/style-and-conventions.md +0 -104
  80. package/skills/ti-guides/references/tiapp-config.md +0 -655
  81. package/skills/ti-howtos/SKILL.md +0 -143
  82. package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -609
  83. package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
  84. package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
  85. package/skills/ti-howtos/references/cross-platform-development.md +0 -358
  86. package/skills/ti-howtos/references/debugging-profiling.md +0 -473
  87. package/skills/ti-howtos/references/extending-titanium.md +0 -684
  88. package/skills/ti-howtos/references/google-maps-v2.md +0 -172
  89. package/skills/ti-howtos/references/ios-map-kit.md +0 -149
  90. package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -595
  91. package/skills/ti-howtos/references/local-data-sources.md +0 -310
  92. package/skills/ti-howtos/references/location-and-maps.md +0 -267
  93. package/skills/ti-howtos/references/media-apis.md +0 -268
  94. package/skills/ti-howtos/references/notification-services.md +0 -539
  95. package/skills/ti-howtos/references/remote-data-sources.md +0 -339
  96. package/skills/ti-howtos/references/tutorials.md +0 -552
  97. package/skills/ti-howtos/references/using-modules.md +0 -182
  98. package/skills/ti-howtos/references/web-content-integration.md +0 -288
  99. package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -125
@@ -1,632 +0,0 @@
1
- # Modules: Map API Reference
2
-
3
- ## Modules.Map
4
- > Add-on Map module
5
- > Extends Ti.Module
6
- > Platforms: both
7
- > Type: module
8
-
9
- ### Requirements
10
-
11
- - Google Maps API key (required for both development and production)
12
- - Google Play services SDK installed using the Android SDK manager
13
- - This module only works on Android devices. This module is not supported on the Android emulator
14
-
15
- ### Getting Started
16
-
17
- - Edit the `modules` section of your tiapp.xml file to include this module:
18
-
19
- ``` xml
20
- <ti:app>
21
- <modules>
22
- <!-- Add this line to your modules section -->
23
- <module platform="android">ti.map</module>
24
-
25
- *(See full overview in titanium-docs)*
26
-
27
- ### Constants (49)
28
- - **ANNOTATION_\***: ANNOTATION_GREEN, ANNOTATION_BLUE, ANNOTATION_AZURE, ANNOTATION_CYAN, ANNOTATION_MAGENTA, ANNOTATION_ORANGE, ANNOTATION_PURPLE, ANNOTATION_ROSE, ANNOTATION_YELLOW, ANNOTATION_VIOLET, ANNOTATION_RED
29
- - **ANNOTATION_DRAG_STATE_\***: ANNOTATION_DRAG_STATE_START, ANNOTATION_DRAG_STATE_END
30
- - **ANNOTATION_VIEW_COLLISION_MODE_\***: ANNOTATION_VIEW_COLLISION_MODE_RECTANGLE, ANNOTATION_VIEW_COLLISION_MODE_CIRCLE
31
- - **FEATURE_\***: FEATURE_TERRITORIES
32
- - **FEATURE_DISPLAY_PRIORITY_\***: FEATURE_DISPLAY_PRIORITY_REQUIRED
33
- - **FEATURE_DISPLAY_PRIORITY_DEFAULT_\***: FEATURE_DISPLAY_PRIORITY_DEFAULT_HIGH, FEATURE_DISPLAY_PRIORITY_DEFAULT_LOW
34
- - **FEATURE_PHYSICAL_\***: FEATURE_PHYSICAL_FEATURES
35
- - **FEATURE_TYPE_POINT_OF_\***: FEATURE_TYPE_POINT_OF_INTEREST
36
- - **FEATURE_VISIBILITY_\***: FEATURE_VISIBILITY_ADAPTIVE, FEATURE_VISIBILITY_HIDDEN, FEATURE_VISIBILITY_VISIBLE
37
- - **HYBRID_\***: HYBRID_TYPE
38
- - **HYBRID_FLYOVER_\***: HYBRID_FLYOVER_TYPE
39
- - **MUTED_STANDARD_\***: MUTED_STANDARD_TYPE
40
- - **NORMAL_\***: NORMAL_TYPE
41
- - **OTHER_\***: SUCCESS
42
- - **OVERLAY_LEVEL_ABOVE_\***: OVERLAY_LEVEL_ABOVE_LABELS, OVERLAY_LEVEL_ABOVE_ROADS
43
- - **POLYLINE_JOINT_\***: POLYLINE_JOINT_BEVEL, POLYLINE_JOINT_DEFAULT, POLYLINE_JOINT_ROUND
44
- - **POLYLINE_PATTERN_\***: POLYLINE_PATTERN_DASHED, POLYLINE_PATTERN_DOTTED
45
- - **REASON_\***: REASON_GESTURE
46
- - **REASON_API_\***: REASON_API_ANIMATION
47
- - **REASON_DEVELOPER_\***: REASON_DEVELOPER_ANIMATION
48
- - **SATELLITE_\***: SATELLITE_TYPE
49
- - **SATELLITE_FLYOVER_\***: SATELLITE_FLYOVER_TYPE
50
- - **SEARCH_RESULT_TYPE_\***: SEARCH_RESULT_TYPE_ADDRESS, SEARCH_RESULT_TYPE_QUERY
51
- - **SEARCH_RESULT_TYPE_POINT_OF_\***: SEARCH_RESULT_TYPE_POINT_OF_INTEREST
52
- - **SERVICE_\***: SERVICE_MISSING, SERVICE_DISABLED, SERVICE_INVALID
53
- - **SERVICE_VERSION_UPDATE_\***: SERVICE_VERSION_UPDATE_REQUIRED
54
- - **TERRAIN_\***: TERRAIN_TYPE
55
-
56
-
57
- ### Methods (15)
58
- | Method | Returns | Platform | Description |
59
- |--------|---------|----------|-------------|
60
- | isGooglePlayServicesAvailable(—) | Number | android | Returns a code to indicate whether Google Play Services is available on the dev… |
61
- | search(value, options) | void | ios | Uses the native `MKLocalSearchCompleter` class to search places for a given inp… |
62
- | geocodeAddress(address, callback) | void | ios | Resolve address details using the `CLGeocoder` to get information (e.g. latitud… |
63
- | getLookAroundImage(callback, latitude, longitude) | void | ios | A utility function that you use to create a static image from a LookAround scen… |
64
- | openLookAroundDialog(latitude, longitude) | void | ios | Opens a LookAround window modally. |
65
- | createAnnotation(parameters) | Modules.Map.Annotation | both | Creates and returns an instance of <Modules.Map.Annotation>. |
66
- | createCamera(parameters) | Modules.Map.Camera | both | Creates and returns an instance of <Modules.Map.Camera>. |
67
- | createCircle(parameters) | Modules.Map.Circle | both | Creates and returns an instance of <Modules.Map.Circle>. |
68
- | createImageOverlay(parameters) | Modules.Map.ImageOverlay | both | Creates and returns an instance of <Modules.Map.ImageOverlay>. |
69
- | createPolygon(parameters) | Modules.Map.Polygon | both | Creates and returns an instance of <Modules.Map.Polygon>. |
70
- | createPolyline(parameters) | Modules.Map.Polyline | both | Creates and returns an instance of <Modules.Map.Polyline>. |
71
- | createRoute(parameters) | Modules.Map.Route | both | Creates and returns an instance of <Modules.Map.Route>. |
72
- | createSnapshotter(parameters) | Modules.Map.Snapshotter | ios | Creates and returns an instance of <Modules.Map.Snapshotter>. |
73
- | createStreetViewPanorama(parameters) | Modules.Map.StreetViewPanorama | android | Creates and returns an instance of <Modules.Map.StreetViewPanorama>. |
74
- | createView(parameters) | Modules.Map.View | both | Creates and returns an instance of <Modules.Map.View>. |
75
-
76
-
77
- ### Related Types
78
-
79
- #### SearchCompletionOptions
80
- > Additional options to fine-tune the search request.
81
-
82
- | Property | Type | Description |
83
- |----------|------|-------------|
84
- | region | MapRegionTypev2 | The region to look for results. Note that only `latitude`, `longitude`, `latitu… |
85
- | resultTypes | Array<Number> | These options configure the types of search results you want to receive, includ… |
86
-
87
- ---
88
-
89
- ## Modules.Map.Annotation
90
- > Represents a labeled point of interest on the map that the user can click on.
91
- > Extends Ti.Proxy
92
- > Platforms: both
93
-
94
- The `Annotation` object gives you low-level control over annotations that can be added to
95
- [map view](Modules.Map.View). An annotation must have its `latitude` and `longitude`
96
- properties set to appear on a map.
97
-
98
- Use the <Modules.Map.createAnnotation> method to create an annotation. Starting with Alloy
99
- 1.4.0, use the **`<Annotation>`** Alloy element to define one in XML markup.
100
-
101
- An annotation can also have a title, a subtitle, and two inset buttons or views on the left
102
- and right side of the title. All of these items are optional.
103
-
104
- The controls on the left and right side of the annotation can be specified in one of two
105
- ways:
106
-
107
- * To display an image, set the [leftButton](Titanium.Map.Annotation.leftButton) or
108
- [rightButton](Titanium.Map.Annotation.rightButton) property to an image URL. (On
109
-
110
- *(See full overview in titanium-docs)*
111
-
112
- ### Properties (unique: 31/34)
113
- | Property | Type | Default | Platform | Description |
114
- |----------|------|---------|----------|-------------|
115
- | canShowCallout | Boolean | — | ios | Defines whether the annotation view is able to display extra information in a c… |
116
- | centerOffset | Point | — | both | Defines a center offset point for the annotation. |
117
- | customView | Ti.UI.View | — | both | Defines a custom view to be used by the annotation. |
118
- | showAsMarker | Boolean | false | ios | Boolean to show an annotation view that displays a balloon-shaped marker at the… |
119
- | markerGlyphText | String | — | ios | The text to display in the marker balloon. |
120
- | markerGlyphColor | String | — | ios | The color to apply to the glyph text or image. |
121
- | markerColor | String | — | ios | The background color of the marker balloon. |
122
- | markerGlyphImage | String \| Ti.Blob | — | ios | The image displayed in the marker balloon. |
123
- | markerSelectedGlyphImage | String \| Ti.Blob | — | ios | The image to display when the marker is selected. |
124
- | markerAnimatesWhenAdded | Boolean | false | ios | Boolean indicating whether the marker animates into position onscreen. |
125
- | markerTitleVisibility | Number | — | ios | The visibility of the title text rendered below the marker balloon. |
126
- | markerSubtitleVisibility | Number | — | ios | The visibility of the subtitle text rendered below the marker balloon. |
127
- | collisionMode | Number | — | ios | The collision mode to use when interpreting the collision frame rectangle. |
128
- | annotationDisplayPriority | Number | Modules.Map.FEATURE_DISPLAY_PRIORITY_REQUIRE | ios | The display priority of this annotation view. |
129
- | clusterIdentifier | String | — | both | An identifier that determines whether the annotation view participates in clust… |
130
- | draggable | Boolean | false | both | Determines whether the pin can be dragged by the user. |
131
- | image | String \| Ti.Blob | If not specified, a standard map pin image is used. | both | Image to use for the the pin. |
132
- | latitude | Number | — | both | Latitude of the annotation, in decimal degrees. |
133
- | longitude | Number | — | both | Longitude of the annotation, in decimal degrees. |
134
- | pincolor | Number \| String | — | both | The color of the pin-annotation. Use the `ANNOTATION_*` constants for pre- defi… |
135
- | subtitle | String | — | both | Secondary title of the annotation view. |
136
- | subtitleid | String | — | both | Key in the locale file to use for the subtitle property. |
137
- | title | String | — | both | Primary title of the annotation view. |
138
- | titleid | String | — | both | Key in the locale file to use for the title property. |
139
- | leftButton | String | — | both | Left button image on the annotation, specified as an image URL. |
140
- | leftView | Ti.UI.View | — | both | Left view that is displayed on the annotation. |
141
- | rightButton | String | — | both | Right button image on the annotation, specified as an image URL. |
142
- | rightView | Ti.UI.View | — | both | Right view that is displayed on the annotation. |
143
- | showInfoWindow | Boolean | true | both | Show or hide the view that is displayed on the annotation when clicked. |
144
- | hidden | Boolean | false | both | Determines whether the annotation is hidden or not. |
145
- | previewContext | Ti.UI.iOS.PreviewContext | — | ios | The preview context used in the 3D-Touch feature "Peek and Pop". |
146
-
147
-
148
- ### Methods (2)
149
- | Method | Returns | Platform | Description |
150
- |--------|---------|----------|-------------|
151
- | animate(newLocation) | void | ios | Animate annotation to new location. |
152
- | rotate(angle) | void | ios | Rotate annotation on its location. |
153
-
154
-
155
- ### Related Types
156
-
157
- #### Point
158
- > A pair of coordinates used to describe the location of a <Titanium.UI.View>.
159
-
160
- | Property | Type | Description |
161
- |----------|------|-------------|
162
- | x | Number \| String | The x-axis coordinate of this point. |
163
- | y | Number \| String | The y-axis coordinate of this point. |
164
-
165
- ---
166
-
167
- ## Modules.Map.Camera
168
- > A camera object defines a point above the map's surface from which to view the map. Available in iOS 7.0 and later.
169
- > Extends Ti.Proxy
170
- > Platforms: both
171
-
172
- Applying a camera to a map has the effect of giving the map a 3D-like appearance.
173
- You can use a camera to rotate the map so that it is oriented to match the user's
174
- heading or to apply a pitch angle to tilt the plane of the map.
175
-
176
- If the app is run on pre iOS 7, camera functionality will not be available.
177
- After creating a `Camera` object, it can be applied to the map by setting the `camera` property of the
178
- [map view](Modules.Map.View).
179
-
180
- Use the <Modules.Map.createCamera> method to create a camera.
181
-
182
- If `altitude`, `eyeCoordinate`, and `centerCoordinate` are passed in on creation, a camera will be
183
- returned using the specified viewing angle information.
184
-
185
- ### Example:
186
- ``` javascript
187
-
188
- *(See full overview in titanium-docs)*
189
-
190
- ### Properties (unique: 5/8)
191
- | Property | Type | Default | Platform | Description |
192
- |----------|------|---------|----------|-------------|
193
- | altitude | Number | — | both | The altitude above the ground, measured in meters. On Android these zoom values… |
194
- | centerCoordinate | MapPointType | — | both | The coordinate point on which the map should be centered. |
195
- | heading | Number | — | both | The heading of the camera (measured in degrees) relative to true north. |
196
- | pitch | Number | — | both | The viewing angle of the camera, measured in degrees. |
197
- | eyeCoordinate | MapPointType | — | both | The coordinate point at which to place the camera. Only used on creation when `… |
198
-
199
-
200
-
201
-
202
- ### Related Types
203
-
204
- #### MapPointType
205
- > An object representing a point on the map.
206
-
207
- | Property | Type | Description |
208
- |----------|------|-------------|
209
- | longitude | Number | Longitude value of the map point, in decimal degrees. |
210
- | latitude | Number | Latitude value of the map point, in decimal degrees. |
211
-
212
- ---
213
-
214
- ## Modules.Map.Circle
215
- > Represents a bounded area on the map.
216
- > Extends Ti.Proxy
217
- > Platforms: both
218
-
219
- The `Circle` object gives you low-level control over circles that can be added to a
220
- [map view](Modules.Map.View). A circle must have a `center` property and a `radius` set to appear on a map.
221
-
222
- Use the <Modules.Map.createCircle> method to create a circle.
223
-
224
- ### Properties (unique: 9/12)
225
- | Property | Type | Default | Platform | Description |
226
- |----------|------|---------|----------|-------------|
227
- | center | MapPointType | — | both | An object with longitude and latitude values. Can also be an array with longitu… |
228
- | radius | Number | — | both | The radius of the circle, specified in meters. It should be zero or greater. |
229
- | blendMode | Number | — | ios | The blend mode to apply to the overlay. |
230
- | fillColor | String | black | both | Color to use when shading the circle, as a color name or hex triplet. |
231
- | strokeColor | String | black | both | Color to use for the border of the circle, as a color name or hex triplet. |
232
- | strokeWidth | Number | 10 | both | Line width in pixels to use when drawing the circle. |
233
- | touchEnabled | Boolean | true | both | Determines whether view should receive touch events. |
234
- | opacity | Number | 1.0 (opaque) | both | Opacity of this map circle, from 0.0 (transparent) to 1.0 (opaque). |
235
- | zIndex | Number | — | android | The order (depth) in which to display the circles. |
236
-
237
-
238
-
239
-
240
- ### Related Types
241
-
242
- #### MapPointType
243
- > An object representing a point on the map.
244
-
245
- | Property | Type | Description |
246
- |----------|------|-------------|
247
- | longitude | Number | Longitude value of the map point, in decimal degrees. |
248
- | latitude | Number | Latitude value of the map point, in decimal degrees. |
249
-
250
- ---
251
-
252
- ## Modules.Map.ImageOverlay
253
- > Represents a bounded area on the map that has an image overlay.
254
- > Extends Ti.Proxy
255
- > Platforms: both
256
-
257
- The `ImageOverlay` object gives you low-level control over image overlays that can be added to a
258
- [map view](Modules.Map.View). An image overlay must have a `boundsCoordinate` property and a `image`
259
- set to appear on a map.
260
-
261
- Use the <Modules.Map.createImageOverlay> method to create an image overlay.
262
-
263
- ### Properties (unique: 2/5)
264
- | Property | Type | Default | Platform | Description |
265
- |----------|------|---------|----------|-------------|
266
- | boundsCoordinate | MapBoundsCoordinateType | — | both | An object representing diagonal coordinates (`topLeft` and `bottomRight`) on th… |
267
- | image | String \| Ti.Blob | — | both | The image that is shown as an overlay on the map. |
268
-
269
-
270
-
271
-
272
- ### Related Types
273
-
274
- #### MapBoundsCoordinateType
275
- > An object representing the bound coordinates on the map.
276
-
277
- | Property | Type | Description |
278
- |----------|------|-------------|
279
- | topLeft | MapPointType | An object with longitude and latitude values. |
280
- | bottomRight | MapPointType | An object with longitude and latitude values. |
281
-
282
- ---
283
-
284
- ## Modules.Map.Polygon
285
- > Represents a bounded area on the map.
286
- > Extends Ti.Proxy
287
- > Platforms: both
288
-
289
- The `Polygon` object gives you low-level control over polygons that can be added to a
290
- [map view](Modules.Map.View). A polygon must have its `points` property set to appear on a map.
291
-
292
- Use the <Modules.Map.createPolygon> method to create a polygon.
293
-
294
- ### Properties (unique: 8/11)
295
- | Property | Type | Default | Platform | Description |
296
- |----------|------|---------|----------|-------------|
297
- | points | Array<MapPointType> | — | both | Array of map points making up the polygon. Can also be an array of longitude (i… |
298
- | holes | Array<Array<MapPointType>> | — | both | Array of points arrays that define holes in the polygon. |
299
- | fillColor | String | black | both | Color to use when shading the polygon, as a color name or hex triplet. |
300
- | strokeColor | String | black | both | Color to use for the border of the polygon, as a color name or hex triplet. |
301
- | strokeWidth | Number | 10 | both | Line width in pixels to use when drawing the polygon. |
302
- | touchEnabled | Boolean | true | both | Determines whether view should receive touch events. |
303
- | zIndex | Number | — | android | The order (depth) in which to display the polygons. |
304
- | bounds | MapRegionTypev2 | — | android | Returns the bounding box of the polygon. Useful to center the region. |
305
-
306
-
307
-
308
-
309
- ### Related Types
310
-
311
- #### MapRegionTypev2
312
- > Simple object representing a map location and zoom level.
313
-
314
- | Property | Type | Description |
315
- |----------|------|-------------|
316
- | bearing | Number | The direction in which a vertical line on the map points, measured in degrees c… |
317
- | longitude | Number | Longitude value for the center point of the map, in decimal degrees. |
318
- | latitude | Number | Latitude value for the center point of the map, in decimal degrees. |
319
- | longitudeDelta | Number | The amount of east-to-west distance displayed on the map, measured in decimal d… |
320
- | latitudeDelta | Number | The amount of north-to-south distance displayed on the map, measured in decimal… |
321
- | tilt | Number | The camera's position on an arc between directly over the map's center position… |
322
- | zoomLevel | Number | The zoom level of the map. |
323
- | selectableMapFeatures | Array<Number> | The property that describes which selectable features the map responds to. |
324
-
325
- ---
326
-
327
- ## Modules.Map.Polyline
328
- > Represents a bounded area on the map.
329
- > Extends Ti.Proxy
330
- > Platforms: both
331
-
332
- The `Polyline` object gives you low-level control over polylines that can be added to a
333
- [map view](Modules.Map.View). A polyline must have its `points` property set to appear on a map.
334
-
335
- Use the <Modules.Map.createPolyline> method to create a polyline.
336
-
337
- ### Example
338
-
339
- ``` javascript
340
- const polyline = Map.createPolyline({
341
- points: [{
342
- latitude: -33.891614,
343
- longitude: 151.276417
344
- },
345
- [-33.87365, 151.20689]
346
- ],
347
-
348
- *(See full overview in titanium-docs)*
349
-
350
- ### Properties (unique: 7/10)
351
- | Property | Type | Default | Platform | Description |
352
- |----------|------|---------|----------|-------------|
353
- | jointType | Number | Modules.Map.POLYLINE_JOINT_DEFAULT | android | Defines the shape of corner points. |
354
- | points | Array<MapPointType> \| String | — | both | Array of map points making up the polyline. Can also be an array of longitude (… |
355
- | strokeColor | String | black | both | Color to use for the the polyline, as a color name or hex triplet. |
356
- | strokeWidth | Number | 10 | both | Line width in pixels to use when drawing the polyline. |
357
- | touchEnabled | Boolean | true | both | Determines whether view should receive touch events. |
358
- | zIndex | Number | — | android | The order (depth) in which to display the polylines. |
359
- | pattern | Object | — | both | Pattern used to draw the polylines. |
360
-
361
-
362
-
363
-
364
- ---
365
-
366
- ## Modules.Map.Route
367
- > Represents a path between two or more points of interest.
368
- > Extends Ti.Proxy
369
- > Platforms: both
370
-
371
- The `Route` object gives you low-level control over routes that can be added to a
372
- [map view](Modules.Map.View). A route must have its `points` property set to appear on a map.
373
-
374
- Use the <Modules.Map.createRoute> method to create a route.
375
-
376
- ### iOS Platform Notes
377
-
378
- The `addRoute` method no longer accepts a dictionary as a parameter. Pass a <Modules.Map.Route> object instead.
379
-
380
- ### Android Platform Notes
381
- The parameter `points` accepts additional the route in format `encoded polyline`.
382
- https://developers.google.com/maps/documentation/utilities/polylinealgorithm
383
-
384
- ### Properties (unique: 4/7)
385
- | Property | Type | Default | Platform | Description |
386
- |----------|------|---------|----------|-------------|
387
- | points | String \| Array<MapPointType> | — | both | Array of map points making up the route. |
388
- | color | String | black | both | Color to use when drawing the route, as a color name or hex triplet. |
389
- | width | Number | 10 | both | Line width in pixels to use when drawing the route. |
390
- | level | Number | <Modules.Map.OVERLAY_LEVEL_ABOVE_LABELS> | ios | The map level at which to place the route. Available in iOS 7.0 and later. |
391
-
392
-
393
-
394
-
395
- ---
396
-
397
- ## Modules.Map.Snapshotter
398
- > Snapshotter is used to allow screen shots to be taken of a specified region or a mapview.
399
- > Extends Ti.Proxy
400
- > Platforms: ios
401
-
402
- ## Examples
403
-
404
- ### Taking a simple snapshot
405
-
406
- This is a map-example which creates a simple snapshot of the specified map-area.
407
-
408
- ``` javascript
409
- const MapModule = require('ti.map');
410
-
411
- const win = Ti.UI.createWindow({
412
- backgroundColor: 'white'
413
- });
414
-
415
- const Snapshotter = MapModule.createSnapshotter({
416
- mapType: MapModule.HYBRID_TYPE,
417
-
418
- *(See full overview in titanium-docs)*
419
-
420
- ### Properties (unique: 5/7)
421
- | Property | Type | Default | Platform | Description |
422
- |----------|------|---------|----------|-------------|
423
- | region | MapRegionTypev2 | — | ios | A dictionary specifying the location and zoom level of the map. |
424
- | showsPointsOfInterest | Boolean | true | ios | When this property is set to YES, the map displays icons and labels for restaur… |
425
- | size | SnapshotSize | — | ios | A dictionary specifying the width and height of the snapshot. |
426
- | mapType | Number | NORMAL_TYPE | ios | Map type constant, either <Modules.Map.NORMAL_TYPE>, <Modules.Map.SATELLITE_TYP… |
427
- | showsBuildings | Boolean | true | ios | Determines whether building will be shown on the map. The mapType property must… |
428
-
429
-
430
- ### Methods (1)
431
- | Method | Returns | Platform | Description |
432
- |--------|---------|----------|-------------|
433
- | takeSnapshot(success, error) | Ti.Blob | ios | Takes a snap shot of of the map corresponding to the region property or a snap … |
434
-
435
-
436
- ### Related Types
437
-
438
- #### MapRegionTypev2
439
- > Simple object representing a map location and zoom level.
440
-
441
- | Property | Type | Description |
442
- |----------|------|-------------|
443
- | bearing | Number | The direction in which a vertical line on the map points, measured in degrees c… |
444
- | longitude | Number | Longitude value for the center point of the map, in decimal degrees. |
445
- | latitude | Number | Latitude value for the center point of the map, in decimal degrees. |
446
- | longitudeDelta | Number | The amount of east-to-west distance displayed on the map, measured in decimal d… |
447
- | latitudeDelta | Number | The amount of north-to-south distance displayed on the map, measured in decimal… |
448
- | tilt | Number | The camera's position on an arc between directly over the map's center position… |
449
- | zoomLevel | Number | The zoom level of the map. |
450
- | selectableMapFeatures | Array<Number> | The property that describes which selectable features the map responds to. |
451
-
452
- #### SnapshotSize
453
- > Simple dictionary used as an argument to [setSize](Modules.Map.Snapshotter.setSize).
454
-
455
- | Property | Type | Description |
456
- |----------|------|-------------|
457
- | height | Number | The height the be used for the snapshot. |
458
- | width | Number | The height the be used for the snapshot. |
459
-
460
- ---
461
-
462
- ## Modules.Map.StreetViewPanorama
463
- > Provides panoramic 360-degree views from designated roads throughout its coverage area.
464
- > Extends Ti.UI.View
465
- > Platforms: android
466
-
467
- Each street view panorama is an image, or set of images, that provides a full 360-degree view from
468
- a single location. It provides a viewer that renders the panorama as a sphere with a camera at its center.
469
- A window can only contain one street view.
470
-
471
- ### Properties (unique: 5/66)
472
- | Property | Type | Default | Platform | Description |
473
- |----------|------|---------|----------|-------------|
474
- | position | StreetViewPosition | — | android | A dictionary specifying the position of the street view. |
475
- | panning | Boolean | true | android | Determines whether the user is able to re-orient the camera by dragging. |
476
- | zoom | Boolean | true | android | Determines whether the user is able to pinch to zoom. |
477
- | streetNames | Boolean | true | android | Determines whether the user is able to see street names displayed. |
478
- | userNavigation | Boolean | true | android | Determines whether the user is able to move to a different panorama. |
479
-
480
-
481
-
482
-
483
- ### Related Types
484
-
485
- #### StreetViewPosition
486
- > Simple object representing a street view coordinates.
487
-
488
- | Property | Type | Description |
489
- |----------|------|-------------|
490
- | longitude | Number | Longitude value for the center point of the view, in decimal degrees. |
491
- | latitude | Number | Latitude value for the center point of the view, in decimal degrees. |
492
-
493
- ---
494
-
495
- ## Modules.Map.View
496
- > Map view is used for embedding native mapping capabilities as a view in your application.
497
- > Extends Ti.UI.View
498
- > Platforms: both
499
-
500
- With native maps, you can control the mapping location, the type of map, the zoom level
501
- and you can add custom annotations and routes directly to the map. Once the map view is
502
- displayed, the user can pan, zoom and tilt the map using the native control gestures.
503
-
504
- Use the <Modules.Map.createView> method to create a map view.
505
-
506
- In Alloy, use the **`<Module>`** element with the `module` attribute set to `ti.map`
507
- and `method` attribute set to `createView` to create a map view in XML markup:
508
-
509
- ``` xml
510
-
511
- ### Properties (unique: 29/101)
512
- | Property | Type | Default | Platform | Description |
513
- |----------|------|---------|----------|-------------|
514
- | animate | Boolean | false | both | Indicates if changes to the mapping region should be animated. |
515
- | annotations | Array<Modules.Map.Annotation> | — | both | An array of annotations to add to the map. |
516
- | liteMode | Boolean | false | android | Create a liteMode map version |
517
- | mapType | Number | NORMAL_TYPE | both | Map type constant, either <Modules.Map.NORMAL_TYPE>, <Modules.Map.SATELLITE_TYP… |
518
- | zOrderOnTop | Boolean | false | both | Controls wether the map view's surface is placed on top of its window. |
519
- | region | MapRegionTypev2 | latitude 0, longitude 0 | both | A dictionary specifying the location and zoom level of the map. |
520
- | padding | MapViewPadding | — | both | Sets the distance between each edges of the view to the map controls. |
521
- | userLocation | Boolean | false | both | Boolean indicating if the user's current device location should be shown on the… |
522
- | userLocationButton | Boolean | true | android | Enable or disables the My Location button. If the button is enabled, it is only… |
523
- | compassEnabled | Boolean | true | both | Enable or disables the compass button. |
524
- | mapToolbarEnabled | Boolean | true | android | Enable or disables the map toolbar. |
525
- | enableZoomControls | Boolean | true | android | Enables or disables the built-in zoom controls. |
526
- | maxZoomLevel | Number | — | android | Returns the maximum zoom level available at the current camera position. |
527
- | minZoomLevel | Number | — | android | Returns the minimum zoom level available at the current camera position. |
528
- | minClusterSize | Number | 4 | android | Sets the minium size of a cluster. |
529
- | zoom | Number | — | android | Returns the current zoom level from the current camera position. |
530
- | traffic | Boolean | false | android | Toggles the traffic layer on or off. |
531
- | camera | Modules.Map.Camera | — | both | The camera used for determining the appearance of the map. |
532
- | pitchEnabled | Boolean | — | ios | A Boolean value indicating whether the map camera's pitch information is used. |
533
- | rotateEnabled | Boolean | — | ios | A Boolean value indicating whether the map camera's heading information is used. |
534
- | scrollEnabled | Boolean | true | both | A Boolean value indicating whether the map can be scrolled by dragging gesture. |
535
- | showsBuildings | Boolean | true | ios | A Boolean indicating whether the map displays extruded building information. |
536
- | showsPointsOfInterest | Boolean | true | ios | A Boolean indicating whether the map displays point-of-interest information. |
537
- | showsCompass | Boolean | true | ios | A Boolean indicating whether the map displays a compass control. |
538
- | showsScale | Boolean | false | ios | A Boolean indicating whether the map shows scale information. |
539
- | showsTraffic | Boolean | false | ios | A Boolean value indicating whether the map displays traffic information. |
540
- | style | String | false | android | JSON String to style the Map. |
541
- | zoomEnabled | Boolean | true | both | A Boolean value indicating whether the map can be zoomed by pinching or tapping. |
542
- | indoorEnabled | Boolean | true | android | A Boolean value indicating whether the indoor mapping is enabled. |
543
-
544
-
545
- ### Methods (34)
546
- | Method | Returns | Platform | Description |
547
- |--------|---------|----------|-------------|
548
- | addAnnotation(annotation) | void | both | Adds a new annotation to the map. |
549
- | addAnnotations(annotations) | void | both | Adds one or more new annotations to the map. |
550
- | addRoute(route) | void | both | Adds a route to the map. |
551
- | addHeatmap(coordinates) | void | android | Adds a heatmap to the map. |
552
- | containsCoordinate(coordinate) | Boolean | both | Validated whether or not a given coordinate is currently visible in the map rec… |
553
- | deselectAnnotation(annotation) | void | both | Deselects the specified annotation, so the main annotation is hidden and only a… |
554
- | removeAllAnnotations(—) | void | both | Removes all annotations from the map. |
555
- | removeAnnotation(annotation) | void | both | Removes an existing annotation from the map. |
556
- | removeAnnotations(annotations) | void | both | Removes one or more existing annotations from the map. |
557
- | removeRoute(route) | void | both | Remove a previously added route. |
558
- | selectAnnotation(annotation) | void | both | Selects the annotation, showing the full annotation. |
559
- | setMapType(mapType) | void | both | Sets the type of map (satellite, normal, or terrain). |
560
- | setLocation(location) | void | both | Sets the map location and zoom level. |
561
- | zoom(level) | void | both | Zooms in or out of the map. |
562
- | snapshot(—) | void | android | Takes a snapshot of the map |
563
- | animateCamera(animationParams, callback) | void | both | Changes the camera used for determining the map's viewing parameters and animat… |
564
- | showAnnotations(annotations) | void | both | Sets the visible region so that the map displays the specified annotations. If … |
565
- | addPolygon(polygon) | void | both | Adds a new polygon to the map. |
566
- | addPolygons(polygons) | void | both | Adds one or more new polygons to the map. |
567
- | removePolygon(polygon) | void | both | Remove a polygon from the map. |
568
- | removeAllPolygons(—) | void | both | Remove all polygons from the map. |
569
- | addPolyline(polygon) | void | both | Adds a new polylines to the map. |
570
- | addPolylines(polylines) | void | both | Adds one or more new polylines to the map. |
571
- | removePolyline(polyline) | void | both | Remove a polyline from the map. |
572
- | removeAllPolylines(—) | void | both | Remove all polylines from the map. |
573
- | addCircle(circle) | void | both | Adds a new circle to the map. |
574
- | addCircles(circles) | void | ios | Adds one or more new circles to the map. |
575
- | removeCircle(circle) | void | both | Remove a circle from the map. |
576
- | removeAllCircles(—) | void | both | Remove all circles from the map. |
577
- | addImageOverlay(imageOverlay) | void | both | Adds a new image overlay to the map. |
578
- | addImageOverlays(imageOverlays) | void | both | Adds one or more new image overlays to the map. |
579
- | removeImageOverlay(imageOverlay) | void | both | Remove an image overlay from the map. |
580
- | removeAllImageOverlays(—) | void | both | Remove all image overlays from the map. |
581
- | setClusterAnnotation(clusterAnnotationParam) | void | both | Set new cluster annotation for the clustered annotation. |
582
-
583
- ### Events (12)
584
- | Event | Platform | Description |
585
- |-------|----------|-------------|
586
- | click | both | Fired when the user selects or deselects an annotation, a polygon, a polyline o… |
587
- | longclick | android | Fired when the user makes a long-press gesture on the map. |
588
- | clusterstart | ios | Fired when a collision between annotations occures. |
589
- | onsnapshotready | android | Fired when the snapshot is ready after [snapshot](Modules.Map.View.snapshot) is… |
590
- | pinchangedragstate | both | Fired when the user interacts with a draggable annotation. |
591
- | complete | both | Fired when the map completes loading. |
592
- | mapclick | both | Fired when the user clicks on the map |
593
- | regionwillchange | both | Fired when the mapping region will change. |
594
- | regionchanged | both | Fired when the mapping region finished changing. |
595
- | userLocation | both | Fired when the user changes on the map. |
596
- | poideselect | ios | Fired when the user deselects a Point of Interest (e.g. restaurant or hotel). |
597
- | poiclick | ios | Fired when the user selects a Point of Interest (e.g. restaurant or hotel). |
598
-
599
- ### Related Types
600
-
601
- #### CameraAnimationParams
602
- > Simple object used to control camera animations.
603
-
604
- | Property | Type | Description |
605
- |----------|------|-------------|
606
- | camera | Modules.Map.Annotation | <Modules.Map.Camera> to be animated to. |
607
- | duration | Number | The amount of time (in milliseconds) that the animation will last. |
608
- | curve | Number | Animation curve or easing function to apply to the animation. |
609
-
610
- #### ClusterAnnotationParams
611
- > Simple object used to create cluster annotation view.
612
-
613
- | Property | Type | Description |
614
- |----------|------|-------------|
615
- | memberAnnotations | Array<Modules.Map.Annotation> | Array of Modules.Map.Annotation, which is recieved in event 'clusteringstarted'… |
616
- | annotation | Modules.Map.Annotation | <Modules.Map.Annotation> instance, which you want to show as clustered annotati… |
617
-
618
- #### MapLocationTypeV2
619
- > Simple object used as an argument to [setLocation](Modules.Map.View.setLocation).
620
-
621
- | Property | Type | Description |
622
- |----------|------|-------------|
623
- | longitude | Number | Longitude value for the center point of the map, in decimal degrees. |
624
- | latitude | Number | Latitude value for the center point of the map, in decimal degrees. |
625
- | longitudeDelta | Number | The amount of east-to-west distance displayed on the map, measured in decimal d… |
626
- | latitudeDelta | Number | The amount of north-to-south distance displayed on the map, measured in decimal… |
627
- | animate | Boolean | Set to `true` to animate the move to the new location. |
628
-
629
- *Plus 3 more types: MapViewPadding*
630
-
631
- ---
632
-