Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2458] Modules.Map is not at all working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2013-12-12T18:14:21.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsDocumentation, Studio, Titanium SDK & CLI
LabelsMapModule, Titanium3.2-Beta
ReporterManojkumar Murugesan
AssigneeShak Hossain
Created2013-12-10T05:47:50.000+0000
Updated2016-03-08T07:41:30.000+0000

Description

I want to use the native iOS map module introduced in SDK 3.2 (http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map) I downloaded the module from https://github.com/appcelerator-modules/ti.map and followed the documentation. When I launch the simulator, it shows the error popup says - "Couldn't find module : ti.map" I have attached the screenshot for your reference. I even tried to download the source code and debug with Xcode, even there it says "Build Succeed" and no simulator is launched. This is what I have in index.js
 
function opened(e) {
	var Map = require('ti.map');
	alert(Map);
	var mapview = Map.createView({
		mapType : Map.NORMAL_TYPE
	});
	$.index.add(mapview);
}

$.index.open();

Attachments

FileDateSize
iOS Simulator Screen shot 10-Dec-2013 11.16.39 am.png2013-12-10T05:47:50.000+000067395
Screen Shot 2013-12-10 at 11.09.53 am.png2013-12-10T05:49:46.000+000097448

Comments

  1. Mostafizur Rahman 2013-12-10

    Hello Manoj, I tested this issue with the test code below. I can’t reproduce this issue in Ti SDK 3.2.0.v20131209192649. Please install the latest SDK and test your app. If you continue to get error, please send us a test case with steps to reproduce. for more information please visit [Modules.Map| http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map]

    Testing Environment:

    Ti CLI 3.3.0 Titanium SDK: 3.2.0.v20131209192649 iOS simulator 7.0 Alloy 1.3.0-beta

    Test Code

    index.xml
       <Alloy>
       	<Window> 
       		<View id="mapview" ns="Alloy.Globals.Map"   />
       	</Window>
       </Alloy>
       
    index.js
        
       var mountainView = Alloy.Globals.Map.createAnnotation({
       	latitude : 37.390749,
       	longitude : -122.081651,
       	title : "Appcelerator Headquarters",
       	subtitle : 'Mountain View, CA',
       	pincolor : Alloy.Globals.Map.ANNOTATION_RED,
       	myid : 1 // Custom property to uniquely identify this annotation.
       });
       
       $.mapview.region = {
       	latitude : 33.74511,
       	longitude : -84.38993,
       	latitudeDelta : 0.01,
       	longitudeDelta : 0.01
       };
       $.mapview.addAnnotation(mountainView);
       
       $.index.open(); 
       

    Steps to Test

    1. Create a alloy project 2. Update index.xml, index.js file 3. Add ti.map module in tiapp.xml file 4. And run this project with testing environment Thanks
  2. Manojkumar Murugesan 2013-12-12

  3. Manojkumar Murugesan 2013-12-12

    I fixed that error dialog by refreshing the run configuration as mentioned here http://developer.appcelerator.com/question/157396/xcode-5-titanium-sdk-313-ga No issues now. Thanks for your clarification.
  4. Ritu Agrawal 2013-12-12

    [~mano_mykingdom] Thank you for your feedback. Appreciate it. Closing the ticket.

JSON Source