Projects regarding MAP

You must Login before you can answer or comment on any questions.

Hi,Can anyone please tell me a sample project,which will give my current location in map in titanium.

Thanks

2 Answers

you can get sample in kitchen sink application here : http://developer.appcelerator.com/doc/kitchensink

— answered 11 months ago by Moiz Chhatriwala
answer permalink
2 Comments
  • Thanks...

    But I want a sample project regarding MAP.That means which will give my current location..... Thanks

    — commented 11 months ago by Suchismita Pavan

  • you can get sample in geolocation.js file

    Titanium.Geolocation.getCurrentPosition(function(e)
        {
            if (!e.success || e.error)
            {
                currentLocation.text = 'error: ' + JSON.stringify(e.error);
                Ti.API.info("Code translation: "+translateErrorCode(e.code));
                alert('error ' + JSON.stringify(e.error));
                return;
            }
     
            var longitude = e.coords.longitude;
            var latitude = e.coords.latitude;
            var altitude = e.coords.altitude;
            var heading = e.coords.heading;
            var accuracy = e.coords.accuracy;
            var speed = e.coords.speed;
            var timestamp = e.coords.timestamp;
            var altitudeAccuracy = e.coords.altitudeAccuracy;
            Ti.API.info('speed ' + speed);
            currentLocation.text = 'long:' + longitude + ' lat: ' + latitude;
     
            Titanium.API.info('geo - current location: ' + new Date(timestamp) + ' long ' + longitude + ' lat ' + latitude + ' accuracy ' + accuracy);
        });

    — commented 11 months ago by Moiz Chhatriwala

— answered 11 months ago by Karthi Ponnusamy
answer permalink
2 Comments
  • Thanks...Actually I am very much new to titanium...

    So can you please tell me what i should do...I will just copy the js and paste that in my app.js file or something else i have to do...

    And can anyone explain how to add a new js.I mean how to link that in my project.....

    Thanks

    — commented 11 months ago by Suchismita Pavan

  • Refer this Tutorial for better understanding (What is Titanium, How it works, What can we do with it)

    seven-days-with-titanium

    also explore KitchenSink

    KitchenSink

    Hope this helps you

    — commented 11 months ago by Karthi Ponnusamy

Your Answer

Think you can help? Login to answer this question!