Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6895] add blob support for Ti.map.annotation.image

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-12-29T16:47:05.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-52, Release 2.0.0, Release 1.8.1
ComponentsiOS
Labelsmodule_map, parity, qe-testadded
ReporterAsim Siddiqui
AssigneeStephen Tramer
Created2011-12-27T16:33:49.000+0000
Updated2012-03-03T23:26:48.000+0000

Description

for Ti.Map.Annotation you should be able to set the image property to a blob in order to support dynamic annotation creation. Right now it only excepts a URL to an image file. Comment from customer: We're facing a technical challenge that can actually make or break us at this point. We have a deadline at the end of january to build a mobile app in titanium that can closely mimic our current app for iOS. Our problem: We need the ability to add labels with dynamic text to annotations. We would actually love to be able to add views to the annotation view but labels would be enough for our current needs.

Attachments

FileDateSize
map_screenshot.jpg2011-12-28T14:18:35.000+000042129

Comments

  1. Asim Siddiqui 2011-12-28

    example screenshot of implementation in native
  2. Stephen Tramer 2011-12-28

    Dynamic label support is an unrelated feature that requires its own ticket and escalation path. Please submit a new feature request: this will not be addressed as part of the resolution for this ticket.
  3. Stephen Tramer 2011-12-28

    TESTING

    ---- Sample code:
       
       var path = "images/send.png";
       var blob = Ti.UI.createImageView({
       	image:"images/chat.png"
       }).toBlob();
       
       var annPath = Ti.Map.createAnnotation({
       	latitude: 37.389569, 
       	longitude: -122.050212, 
       	image: path,
       	animate: true, 
       	pincolor: Ti.Map.ANNOTATION_GREEN, 
       });
       
       var annBlob = Ti.Map.createAnnotation({
       	latitude: 37.331689, 
       	longitude: -122.030731, 
       	image: blob,
       	animate: true, 
       	pincolor: Ti.Map.ANNOTATION_RED
       });
       
       var annotations = [annPath, annBlob];
       
       var map = Ti.Map.createView({
       	mapType: Titanium.Map.STANDARD_TYPE,
       	region: { 
       		latitude:37.389569, 
       		longitude:-122.050212, 
       		latitudeDelta:.05, 
       		longitudeDelta:.05 
       	},
       	animate:true,
       	regionFit:true,
       	userLocation:false,
       	annotations:annotations
       });
       
       var win = Ti.UI.createWindow({backgroundColor:'white'});
       win.add(map);
       win.open();
       
    Note that you will need both images/chat.png and images/send.png in your Resources.
  4. Wilson Luu 2012-02-08

    Closing bug. Verified new feature is behaving as expected on: SDK build: 1.9.0.v20120207171634 Titanium Studio, build: 1.0.8.201201262211 xcode: 4.2 Devices: iphone 4S Sprint (5.0.1)

JSON Source