Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1815] The Mapview region set

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-05-02T00:06:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
Reporterjayesh joshi
AssigneeShak Hossain
Created2013-04-25T05:33:57.000+0000
Updated2016-03-08T07:40:43.000+0000

Description

While MapView in The screen and set region by SetLocation and animate mapview from bottom for showing advertise The Mapview goes in Region change and change it's region to default..aslo if we set region after that it not working

Comments

  1. Mauro Parra-Miranda 2013-04-26

    Hello, this is not enough information in order to properly understand the bug you are trying to report. Please read this instructions: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report and provide a test case. TIA!
  2. Mostafizur Rahman 2013-12-14

    We tested this issue with the test code below and were not able to reproduce this with Titanium SDK 3.1.3.GA. We highly recommend to use the latest SDK as it has many new features and fixes. Please try our tested code and let us know if the issue persists. If yes, please send your sample code to test.

    Testing Environment:

    OSX Version 10.8.5 and 10.9 Titanium Studio, build: 3.1.3.201309132423 Ti CLI 3.1.2, 3.2.0-cr3 Titanium SDK: 3.1.3.GA IOS Simulator 7.0

    Test Code

       var win = Ti.UI.createWindow();
       
       var mapview = Titanium.Map.createView({
       	mapType : Titanium.Map.STANDARD_TYPE,
       	animate : true,
       	regionFit : true,
       	userLocation : false,
       	width : '100%',
       	height : '100%',
       	top : 0,
       });
       
       mapview.setLocation({
       	latitude : 37.337681,
       	longitude : -122.038193,
       	animate : true,
       	latitudeDelta : 0.04,
       	longitudeDelta : 0.04
       });
       
       mapview.addEventListener('complete', function(e) {
       	Ti.API.info('complete');
       	displayAnimation();
       });
       
       mapview.addEventListener('regionChanged', function(e) {
       	Ti.API.info('regionChanged');
       	Ti.API.info(e);
       });
       
       function displayAnimation(args) {
       
       	var view = Titanium.UI.createView({
       		bottom : 0,
       		backgroundColor : 'red',
       		height : 100
       	});
       	win.add(view);
       	var label = Titanium.UI.createLabel({
       		text : 'x',
       		right : 0,
       		top : 0,
       		color : 'blue'
       	});
       	view.add(label);
       
       	var animation = Titanium.UI.createAnimation();
       	animation.backgroundColor = 'black';
       	animation.duration = 5000;
       
       	var animationHandler = function() {
       		animation.removeEventListener('complete', animationHandler);
       		animation.backgroundColor = 'orange';
       		view.animate(animation);
       
       		mapview.setHeight('80%');
       	};
       	animation.addEventListener('complete', animationHandler);
       	view.animate(animation);
       
       	label.addEventListener('click', function(e) {
       
       		mapview.setHeight('100%');
       		mapview.setWidth('100%');
       		view.hide();
       		mapview.setLocation({
       			latitude : 37.333681,
       			longitude : -122.033193,
       			animate : true,
       			latitudeDelta : 0.04,
       			longitudeDelta : 0.04
       		});
       
       	});
       
       }
       
       // Add to parent
       
       win.add(mapview);
       win.open();
       
       

JSON Source