Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16926] iOS: Using customView Annotation property hides the map pin

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2016-11-11T20:21:52.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsiOS
Labelsios
Reporterjayesh joshi
AssigneeEric Merriman
Created2014-05-05T07:08:11.000+0000
Updated2017-03-23T22:49:30.000+0000

Description

I need the red color pin and when i click on pin custom view should appear. var cust_View = Titanium.UI.createView({ backgroundImage : '/popup.png', width : 154, height : 126 }); var anno = MapModule.createAnnotation({ latitude : -33.87365, longitude : 151.20689, //image : '/van_green.png', pincolor : MapModule.ANNOTATION_RED, //customView : cust_View }); I do like above so it shows the cust_View on Map location No red pin at that Location i need both.

Comments

  1. Ritu Agrawal 2014-05-05

    Please provide a complete runnable test case to investigate the issue further.
  2. jayesh joshi 2014-05-06

       var MapModule = require('ti.map');
       var ann_data = [];
       var cust_View = Titanium.UI.createView({
       	backgroundImage : '/popup.png',
       	width : 154,
       	height : 126
       });
       var anno = MapModule.createAnnotation({
       	latitude : -33.87365,
       	longitude : 151.20689,
       	pincolor : MapModule.ANNOTATION_RED,
       });
       var anno2 = MapModule.createAnnotation({
       	latitude : -33.86365,
       	longitude : 151.21689,
       	pincolor : MapModule.ANNOTATION_RED,
       });
       var anno3 = MapModule.createAnnotation({
       	latitude : -33.85365,
       	longitude : 151.20689,
       	pincolor : MapModule.ANNOTATION_RED,
       	customView : cust_View
       });
       
       ann_data.push(anno, anno2, anno3);
       
       var map = MapModule.createView({
       	enableZoomControls : false,
       	mapType : MapModule.NORMAL_TYPE,
       	animate : true,
       	annotations : ann_data,
       	region : {
       		latitude : -33.87365,
       		longitude : 151.20689,
       		latitudeDelta : 0.1,
       		longitudeDelta : 0.1
       	}
       });
       
       win = Ti.UI.createWindow();
       win.add(map);
       win.open();
       
    anno3 only show the custome images that i given not show pin + images ... in Documentation it says if you give custom view it will not show pin image or pincolor ... but how ever i need both ... i know it's not bug can be future request but any help...
  3. Ritu Agrawal 2014-05-07

    Moving this ticket to engineering as I can reproduce the issue with the provided test case. Setting customView property causes pin to disappear from the map. A typical use case is to show the pin and then custom view should be displayed when the pin is clicked but in this case pin is not drawn when the custom view is used. It is perfectly legal to use pincolor and customView together as per documentation. Only exception is an image i.e. an image cannot be used for the pin when a customView is used but setting the pincolor together with customView is permissible.
  4. Hans Knöchel 2016-11-11

    Resolving as duplicate of MOD-2201, please follow that one, thx!
  5. Lee Morris 2017-03-23

    Closing ticket as Duplicate with reference to the above comments.

JSON Source