Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand Down
6 changes: 3 additions & 3 deletions android/src/ti/map/CameraProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void handleCreationDict(KrollDict dict)
TiConvert.toDouble(point.get(TiC.PROPERTY_LONGITUDE)));
}
}
if (dict.containsKeyAndNotNull(MapModule.PROPERTY_ALTITIDE)) {
zoom = TiConvert.toFloat(dict.get(MapModule.PROPERTY_ALTITIDE));
if (dict.containsKeyAndNotNull(MapModule.PROPERTY_ALTITUDE)) {
zoom = TiConvert.toFloat(dict.get(MapModule.PROPERTY_ALTITUDE));
}
if (dict.containsKeyAndNotNull(MapModule.PROPERTY_HEADING)) {
heading = TiConvert.toFloat(dict.get(MapModule.PROPERTY_HEADING));
Expand All @@ -68,7 +68,7 @@ public void onPropertyChanged(String name, Object value)
TiConvert.toDouble(point.get(TiC.PROPERTY_LONGITUDE)));
}
}
if (name.equals(MapModule.PROPERTY_ALTITIDE)) {
if (name.equals(MapModule.PROPERTY_ALTITUDE)) {
zoom = TiConvert.toFloat(value);
}
if (name.equals(MapModule.PROPERTY_HEADING)) {
Expand Down
2 changes: 1 addition & 1 deletion android/src/ti/map/MapModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class MapModule extends KrollModule implements OnMapsSdkInitializedCallba
public static final String PROPERTY_LITE_MODE = "liteMode";
public static final String PROPERTY_MIN_CLUSTER_SIZE = "minClusterSize";
public static final String PROPERTY_CENTER_COORDINATES = "centerCoordinates";
public static final String PROPERTY_ALTITIDE = "altitude";
public static final String PROPERTY_ALTITUDE = "altitude";
public static final String PROPERTY_HEADING = "heading";
public static final String PROPERTY_PITCH = "pitch";

Expand Down
6 changes: 3 additions & 3 deletions android/src/ti/map/TiMapInfoWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void setLeftOrRightPane(Object obj, int flag)
} else if (flag == RIGHT_PANE) {
pane = rightPane;
} else {
Log.e(TAG, "Invalid valud for flag in setLeftOrRightPane", Log.DEBUG_MODE);
Log.e(TAG, "Invalid value for flag in setLeftOrRightPane", Log.DEBUG_MODE);
return;
}

Expand Down Expand Up @@ -192,8 +192,8 @@ public void setLeftOrRightPane(Object obj, int flag)
* Analyze the touch event to find out:
* 1. whether it is inside the info window and
* 2. if it is, what the corresponding clicksource is.
* The clicksource can be one of "leftPane", "title", "subtible", "rightPane" or null. Null means the event
* is not inside "leftPane", "title", "subtible" or "rightPane".
* The clicksource can be one of "leftPane", "title", "subtitle", "rightPane" or null. Null means the event
* is not inside "leftPane", "title", "subtitle" or "rightPane".
* @param ev The MotionEvent detected. Its coordinates are relative to the map view.
* @param markerPoint The screen coordinate for the marker which displays the info window.
* @param iconImageHeight The height of the marker icon.
Expand Down
2 changes: 1 addition & 1 deletion android/src/ti/map/TiUIMapView.java
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ public void onInfoWindowClick(Marker marker)
if (annoProxy != null) {
String clicksource = annoProxy.getMapInfoWindow().getClicksource();
// The clicksource is null means the click event is not inside
// "leftPane", "title", "subtible"
// "leftPane", "title", "subtitle"
// or "rightPane". In this case, use "infoWindow" as the
// clicksource.
if (clicksource == null) {
Expand Down
2 changes: 1 addition & 1 deletion apidoc/Circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ since: { android: "4.1.0", iphone: "4.1.0", ipad: "4.1.0", macos: "9.2.0" }
platforms: [android, iphone, ipad, macos]
properties:
- name: center
summary: An object with longitude and latitude values. Can also be an array with longitude (index 0), latitude (index 1) touples.
summary: An object with longitude and latitude values. Can also be an array with longitude (index 0), latitude (index 1) tuples.
availability: creation
type: MapPointType
optional: false
Expand Down
4 changes: 2 additions & 2 deletions apidoc/Map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ examples:
Ti.API.info('Clicked ' + event.clicksource + ' on ' + event.latitude + ', ' + event.longitude);
});

windown.open();
window.open();
```
- title: Alloy XML Markup
example: |
Expand Down Expand Up @@ -803,7 +803,7 @@ properties:
---
name: SearchCompletionOptions
summary: Additional options to fine-tune the search request.
description: The latitute and longitude describe the location, the delta values the distance to include.
description: The latitude and longitude describe the location, the delta values the distance to include.
properties:
- name: region
summary: |
Expand Down
2 changes: 1 addition & 1 deletion apidoc/Polygon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ since: { android: "4.1.0", iphone: "4.1.0", ipad: "4.1.0", macos: "9.2.0" }
platforms: [android, iphone, ipad, macos]
properties:
- name: points
summary: Array of map points making up the polygon. Can also be an array of longitude (index 0), latitude (index 1) touples.
summary: Array of map points making up the polygon. Can also be an array of longitude (index 0), latitude (index 1) tuples.
availability: creation
type: Array<MapPointType>
optional: false
Expand Down
2 changes: 1 addition & 1 deletion apidoc/Polyline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ properties:
since: "5.1.0"

- name: points
summary: Array of map points making up the polyline. Can also be an array of longitude (index 0), latitude (index 1) touples. On Android platform you can use an encoded polyline as string.
summary: Array of map points making up the polyline. Can also be an array of longitude (index 0), latitude (index 1) tuples. On Android platform you can use an encoded polyline as string.
availability: creation
type: [Array<MapPointType>, String]
optional: false
Expand Down
8 changes: 4 additions & 4 deletions apidoc/View.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ methods:

events:
- name: clusterstart
summary: Fired when a collision between annotations occures.
summary: Fired when a collision between annotations occurs.
properties:
- name: memberAnnotations
summary: Array of annotations participating in clustering.
Expand Down Expand Up @@ -429,7 +429,7 @@ events:

For polygon, polyline or circle, The `click` event includes the following values.
`clicksource` is a string describing the shape type. `map` is the map view instance.
`latitude` and `longtitude` is the corresponding coordinates on the map where the user
`latitude` and `longitude` is the corresponding coordinates on the map where the user
clicked in the shape.
properties:
- name: title
Expand Down Expand Up @@ -925,7 +925,7 @@ properties:
summary: A Boolean value indicating whether the map can be zoomed by pinching or tapping.
description: |
When this property is set to `true` the a map view can be zoomed by pinching inwards to zoom out
and reverse to zoom in. Zooming in can also be accoplished by double-tapping the map view. Zooming
and reverse to zoom in. Zooming in can also be accomplished by double-tapping the map view. Zooming
out can also be accomplished by two-finger tapping the map view.
type: Boolean
default: true
Expand Down Expand Up @@ -1081,7 +1081,7 @@ since: "6.3.0"
properties:
- name: memberAnnotations
summary: |
Array of Modules.Map.Annotation, which is recieved in event 'clusteringstarted' as
Array of Modules.Map.Annotation, which is received in event 'clusteringstarted' as
memberAnnotations.
type: Array<Modules.Map.Annotation>

Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/TiMapAnnotationProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
CGPoint offset;
}

// Center latitude and longitude of the annotion view.
// Center latitude and longitude of the annotation view.
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@property (nonatomic, readwrite, assign) TiMapViewProxy *delegate;
@property (nonatomic, readonly) BOOL needsRefreshingWithSelection;
Expand Down
6 changes: 3 additions & 3 deletions ios/Classes/TiMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ - (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *

selectedAnnotation = [ann retain];

// If canShowCallout == YES we will try to find calloutView to hadleTap on callout
// If canShowCallout == YES we will try to find calloutView to handle tap on callout
if ([ann canShowCallout]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
[self findCalloutView:ann];
Expand Down Expand Up @@ -1326,7 +1326,7 @@ - (void)animateAnnotation:(TiMapAnnotationProxy *)newAnnotation withLocation:(CL
}
// mapView:viewForAnnotation: provides the view for each annotation.
// This method may be called for all or some of the added annotations.
// For MapKit provided annotations (eg. MKUserLocation) return nil to use the MapKit provided annotatiown view.
// For MapKit provided annotations (e.g. MKUserLocation) return nil to use the MapKit provided annotation view.
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
{
if ([annotation isKindOfClass:[TiMapAnnotationProxy class]]) {
Expand Down Expand Up @@ -1530,7 +1530,7 @@ - (void)handlePolylineClick:(CGPoint)touchPoint
// Polyline points are equal, which means line length is zero. Use distance from one of the poly points.
distanceFromLine = lengthA;
} else {
// Touch point is between polyline's points. Calculte distance with Heron's formula.
// Touch point is between polyline's points. Calculate distance with Heron's formula.
double value = (lengthA + lengthB + lengthC) / 2.0;
double area = sqrt((value - lengthA) * (value - lengthB) * (value - lengthC) * value);
distanceFromLine = (area * 2.0) / lengthC;
Expand Down
4 changes: 2 additions & 2 deletions ios/Classes/TiMapViewProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
NSMutableArray *circlesToRemove;
NSMutableArray *polylinesToAdd;
NSMutableArray *polylinesToRemove;
NSMutableArray *imageOvelaysToAdd;
NSMutableArray *imageOvelaysToRemove;
NSMutableArray *imageOverlaysToAdd;
NSMutableArray *imageOverlaysToRemove;

int zoomCount; // Number of times to zoom in/out on initial display
}
Expand Down
36 changes: 18 additions & 18 deletions ios/Classes/TiMapViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ - (void)_destroy
RELEASE_TO_NIL(circlesToRemove);
RELEASE_TO_NIL(polylinesToAdd);
RELEASE_TO_NIL(polylinesToRemove);
RELEASE_TO_NIL(imageOvelaysToAdd);
RELEASE_TO_NIL(imageOvelaysToRemove);
RELEASE_TO_NIL(imageOverlaysToAdd);
RELEASE_TO_NIL(imageOverlaysToRemove);
[super _destroy];
}

Expand Down Expand Up @@ -123,11 +123,11 @@ - (void)viewDidAttach
[ourView removePolyline:arg];
}

for (id arg in imageOvelaysToAdd) {
for (id arg in imageOverlaysToAdd) {
[ourView addImageOverlay:arg];
}

for (id arg in imageOvelaysToRemove) {
for (id arg in imageOverlaysToRemove) {
[ourView removeImageOverlay:arg];
}

Expand Down Expand Up @@ -805,13 +805,13 @@ - (void)addImageOverlay:(id)arg
},
NO);
} else {
if (imageOvelaysToAdd == nil) {
imageOvelaysToAdd = [[NSMutableArray alloc] init];
if (imageOverlaysToAdd == nil) {
imageOverlaysToAdd = [[NSMutableArray alloc] init];
}
if (imageOvelaysToRemove != nil && [imageOvelaysToRemove containsObject:arg]) {
[imageOvelaysToRemove removeObject:arg];
if (imageOverlaysToRemove != nil && [imageOverlaysToRemove containsObject:arg]) {
[imageOverlaysToRemove removeObject:arg];
} else {
[imageOvelaysToAdd addObject:arg];
[imageOverlaysToAdd addObject:arg];
}
}
}
Expand All @@ -827,13 +827,13 @@ - (void)removeImageOverlay:(id)arg
},
NO);
} else {
if (imageOvelaysToRemove == nil) {
imageOvelaysToRemove = [[NSMutableArray alloc] init];
if (imageOverlaysToRemove == nil) {
imageOverlaysToRemove = [[NSMutableArray alloc] init];
}
if (imageOvelaysToAdd != nil && [imageOvelaysToAdd containsObject:arg]) {
[imageOvelaysToAdd removeObject:arg];
if (imageOverlaysToAdd != nil && [imageOverlaysToAdd containsObject:arg]) {
[imageOverlaysToAdd removeObject:arg];
} else {
[imageOvelaysToRemove addObject:arg];
[imageOverlaysToRemove addObject:arg];
}
}
}
Expand Down Expand Up @@ -864,14 +864,14 @@ - (void)setImageOverlays:(id)args
if (attached) {
TiThreadPerformOnMainThread(
^{
[(TiMapView *)[self view] addImageOverlays:imageOvelaysToAdd];
[(TiMapView *)[self view] addImageOverlays:imageOverlaysToAdd];
[initialImageOverlays release];
},
NO);
} else {
RELEASE_TO_NIL(imageOvelaysToAdd);
RELEASE_TO_NIL(imageOvelaysToRemove);
imageOvelaysToAdd = [[NSMutableArray alloc] initWithArray:initialImageOverlays];
RELEASE_TO_NIL(imageOverlaysToAdd);
RELEASE_TO_NIL(imageOverlaysToRemove);
imageOverlaysToAdd = [[NSMutableArray alloc] initWithArray:initialImageOverlays];
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/unit/karma.unit.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function projectManagerHook(projectManager) {
console.log(`Copying ${src} to ${dest}`);
fs.copySync(src, dest);

// Trun off app thinning so images don't get shoved in asset catalog
// Turn off app thinning so images don't get shoved in asset catalog
const tiapp = path.join(this.karmaRunnerProjectPath, 'tiapp.xml');
const contents = fs.readFileSync(tiapp, 'utf8');
fs.writeFileSync(tiapp, contents.replace('</ios>', `<use-app-thinning>false</use-app-thinning>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/route.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('ti.map.Route', () => {
});
});

it('instace should be defined', () => {
it('instance should be defined', () => {
expect(route1).not.toEqual(undefined);
});

Expand Down