Titanium JIRA Archive
Alloy (ALOY)

[ALOY-503] Support Ti.Map.View > Annotation for Model-View binding

GitHub Issuen/a
TypeStory
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-04-23T20:54:09.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0, 2014 Sprint 08
ComponentsModels, Runtime, XML
Labelsalloy, annotation, annotations, bindings, collection, map, mapView, maps, model, qe-manualtest, view, views
ReporterIngo Muschenetz
AssigneeTim Poulsen
Created2012-12-20T14:12:34.000+0000
Updated2015-06-25T08:03:31.000+0000

Description

Just like:
<TableView dataCollection="place">
  <TableViewRow title="{title}" />
</TableView>
I want to be able to do:
<View id="mapview" ns="Ti.Map" animate="true" regionFit="true" userLocation="true" dataCollection="place">
    <Annotation latitude="{latitude}" longitude="{longitude}" title="{title}" />
</View>

Comments

  1. Manuel Lehner 2014-01-24

    Since Ti.Map is deprecated, this would be better for Annotations of Modules.Map
  2. Tim Poulsen 2014-04-23

    PR: https://github.com/appcelerator/alloy/pull/372 Functional test: 1. Test on the iOS simulator or Android device (see note below). 2. Remove the Harness app from the simulator/emulator to reset the database and any app properties that might have been created by previous tests. 3. Then, build & run the included test app, which will create an app with four annotations. One of those is defined in the XML and the other three via data binding. 4. Edit the test app's app/views/index.xml file to enable the dataFilter and/or dataTransform options, following the comments in that file. With dataTransform, annotation titles will be surrounded by square brackets. With dataFilter, only one annotation from the collection (plus the one XML-defined annotation) will be defined. Please note that Map annotation binding will not support: * - Annotation.customView * - Annotation.leftView * - Annotation.rightView As those are Ti.UI.View instances, which cannot be saved to the collection (as View objects). Android note: you must run this on a device or Genymotion emulator with Play Services installed. You might need to update the HarnessTemplate/tiapp.xml file with the Maps API key noted in ALOY-800.
  3. Tim Poulsen 2014-04-23

    PR merged
  4. Tim Poulsen 2014-04-23

    Oh, forgot to mention, this relies on the use of which was made possible by ALOY-800. You cannot use the based techniques formerly documented for maps.
  5. Fokke Zandbergen 2014-04-24

    Nice job [~skypanther]! Don't get exactly why customView, leftView and rightView can not be supported. Can't you just use proxy elements like <RightNavButton> etc?
  6. Fokke Zandbergen 2014-04-24

    *@&@#@$... could someone please install the markdown plugin? https://marketplace.atlassian.com/plugins/atlassian-jira-markdown-plugin

JSON Source