Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added showPin option to snapshotter #478

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mbender74
Copy link

@mbender74 mbender74 commented Sep 3, 2021

when snapshotting a location the option to display a pin (annotation) in the snapshot image was missing

option "showPin" (default is set to FALSE) will allow to display a pin

var Snapshotter = Map.createSnapshotter({
		mapType: Map.NORMAL_TYPE,
		showPin:true,
		region: {
			latitude: location.latitude,
			longitude: location.longitude
		},
		size: {
			width: 300, 
			height: 200
		}
	});

example

when snapshotting a location the option to display a pin (annotation) in the snapshot image was missing

option "showPin" (default is set to FALSE) will allow to display a pin




var Snapshotter = .Map.createSnapshotter({
		mapType: global.Map.NORMAL_TYPE,
		showPin:true,
		region: {
			latitude: location.latitude,
			longitude: location.longitude
		},
		size: {
			width: 300, 
			height: 200
		}
	});
@build
Copy link

build commented Sep 3, 2021

Warnings
⚠️ SDK version declared in Jenkinsfile (10.0.1.GA) does not match iOS' titanium.xcconfig value (10.0.0.GA)
Messages
📖

✅ All tests are passing
Nice one! All 292 tests are passing.
(There are 2 skipped tests not included in that total)

📖

💾 Here are the artifacts produced:

Generated by 🚫 dangerJS against 0b7140b

@mbender74 mbender74 marked this pull request as ready for review September 3, 2021 04:32
@m1ga
Copy link
Contributor

m1ga commented Sep 13, 2021

Copy link
Contributor

@caspahouzer caspahouzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and should be merged.

any other comments? @m1ga @mbender74

@m1ga
Copy link
Contributor

m1ga commented May 19, 2022

only looking at the files here: not sure about the change of the package-lock file.
Didn't test the functinality

Copy link
Contributor

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to take this once the proposed changes are in! 🙂 In addition, please add the new property to the api docs and bump the manifest version to the next minor (e.g. 7.3.0 to 7.4.0)

@@ -12,6 +12,10 @@

@implementation TiMapSnapshotterProxy

CLLocationDegrees latitudeCoord;
CLLocationDegrees longitudeCoord;
bool showPin = NO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please save the resulting CLLocationCoordinate2D instead, also use the ObjC BOOL type

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh dear, this is old, I already forgot, I did this PR :-D
Ok, I will take care about this all next week ;-)


TiBlob *blob = [[TiBlob alloc] initWithImage:snapshot.image];
TiBlob *blob;
if (showPin == YES) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No explicit == YES check necessary

@@ -4,7 +4,7 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 10.0.1.GA
TITANIUM_SDK_VERSION = 10.0.0.GA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restore the version change (pulling from main should use a recent one)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restore this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants