hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Support "customView" property on Annotation #87

Closed hansemannn closed 7 years ago

hansemannn commented 7 years ago

Addressing #86. Please check the notes regarding the sizing before, thx!

mention-bot commented 7 years ago

@hansemannn, thanks for your PR! By analyzing the history of the files in this pull request, we identified @yozef to be a potential reviewer.

hansemannn commented 7 years ago

@yozef to review :-) Travis only fails because the generated $(TI_MODULE_VERSION) compiler flag is added to 6.1.0, which isn't used in the CI, yet.

yozef commented 7 years ago

Finally was able to compile with SDK 6.1.0.GA and CLI 6.2.2. appc run -p ios --build-only Tested customView successfully.

2017-05-30 at 9 08 23 am
hansemannn commented 7 years ago

Thanks man! Still wondering if infoWindow may do the same already, I did not validate that bth. But if I understood it correctly, infoWindow is only for showing a view when selecting an annotation.

yozef commented 7 years ago

InfoWindow = the Bubble that appears over the icon/customView -- works as expected customView = to be used in lieu of an Image icon (the annotation icon itself)

Also, the click event on infoWindow shows appropriately:

{"clicksource":"infoWindow","annotation":{"userData":{"uuid":"xxxxx-7789-4B6A-A971-605AFE7FAF90"},"title":"Hello Custom View","latitude":45.368122,"longitude":-73.913653,"subtitle":null},....

The Green background is the custom InfoWindow (bubble that appears once the icon/customView is clicked) & the red background is the customView (the annotation icon)

2017-05-30 at 9 35 07 am
DouglasHennrich commented 7 years ago

How can I change it's center so it put the customView center on the pin's "footer" ?

As you can see, my pin footer is on the extreme bottom of my customView

simulator screen shot 30 de mai de 2017 10 54 17

yozef commented 7 years ago

I think these should do it on Annotation:

groundOffset: {
        x: 0.5,
        y: 0,5
    },