Titanium JIRA Archive
Appcelerator Community (AC)

[AC-838] Map View - data binding for annotation is not working

GitHub Issuen/a
ResolutionNeeds more info
Resolution Date2014-09-24T01:35:21.000+0000
Affected Version/sn/a
Fix Version/sn/a
LabelsTCSupportTriage, alloy-cli, alloy-generate
ReporterManojkumar Murugesan
AssigneeMauro Parra-Miranda


<View id="mapView" module="ti.map" platform="ios,android" dataCollection="stores">
	<Annotation latitude="{latitude}" longitude="{longitude}" title="{title}" />
		title : "Sample Title.",
		subtitle : "Subtitle",
		latitude : 37.7728543,
		longitude : -122.4131509
if (e && e.fromAdapter) return;
        __alloyId26.opts || {};
        var models = __alloyId25.models;
        var len = models.length;
        var children = $.__views.mapView.children;
        for (var d = children.length - 1; d >= 0; d--) $.__views.mapView.remove(children[d]);
        for (var i = 0; len > i; i++) {
            var __alloyId23 = models[i];
            __alloyId23.__transform = {};
            $.__views.__alloyId24 = require("ti.map").createAnnotation({
                latitude: 0/0,
                longitude: 0/0,
                title: "undefined" != typeof $model.__transform["title"] ? $model.__transform["title"] : $model.get("title"),
                id: "__alloyId24"
You could see that latitude and longitude is not binding properly. As well not added to map view.


  1. Amimul Hossain 2014-09-13

    Hello, We have tried to reproduce the issue according to specification, with the following process describe below. we were unable to reproduce the issue.


    - Create a alloy project. - Enable ti.map module to the project. - Copy "index.xml" code segment to the project "index.xml" file. - Copy "index.js" code segment to the project "index.js" file. - Create a new file name "stores.js" in project "models" folder. - copy "stores.js" code segment to the project "stores.js" file. - run the project. Unable to generate the issue according to the process, Error shows
       [ERROR] :  Error generating AST for "/Users/GSLMAC002/Desktop/GeneralFile/barsa1/Resources/iphone/alloy/models/Stores.js"
       [ERROR] :  'return' outside of function
       [ERROR] :  line 6, column 30, position 121
       [ERROR] :  Alloy compiler failed
    Please provide a Clean test case and proper steps to regenerate the issue. thanks.
  2. Manojkumar Murugesan 2014-09-13

    I haven't used Alloy Models. I used a temporary backbone collection.
       Alloy.Collections.store = new Backbone.Collection([data]);
  3. Manojkumar Murugesan 2014-09-19

    @Amimul Hossain - Were you able to reproduce this issue?
  4. Mauro Parra-Miranda 2014-09-24

    Will reopen if the reporter adds a full working testcase.

JSON Source