Titanium - Mapview and annotations - iphone

I am an iPhone developer and a beginner in Titanium Studio. I have some ideas about basic concepts of using view, window, tabBar in Titanium. I need to proceed advance to deal with MapViews. Where can I find some guidelines or some samples to work with GeoLocations, open a mapView, get the current location, get latitude and longitudes, point annotation on the specified location. I have another basic question and it will be very silly as I started learning Titanium yesterday. How can I print a string as I use 'NSLog' and 'printf'? Answers are welcomed. Thanks in advance.

In order to find the details of the objects you want to use, you need to go to the details of
Titanium.Geolocation
Titanium.Map
If you want to display the string on the screen you can use
Titanium.UI.Label
There is a very good code example you can use Seven days with Titanium

To print in console you can use,
Ti.API.info("String to Print");
Ti.API.debug("String to Print");
Ti.API.error("String to Print");
Ti.API.warn("String to Print");
Check that Geolocation and Map API (Links already provided by Muhammad Zeeshan) and try to implement a sample code. If find any difficulties than you can post to community again.
Cheers

Related

Google Services Framework Identifier (gsfid) How to get it with Flutter

I am a beginner in flutter and would like your help.
I want to get the Google Services Frameword Identifier (gsfid) in a flutter app, but i can't find any plugin for that. I found a fairly old post on how to do it using java, but I couldn't get it to work, as flutter, if I understood correctly, uses kotlin and unfortunately I'm neither a java nor kotlin expert.
I read all the stuff about deviceID and Android_id, which is confusing enough on its own without starting to mention other "unique" ids (e.g. ad id etc).
I have concluded that what suits me for use in the particular application I have designed is the gsf id.
So if anyone knows the subject and is kind enough to help me, I will be grateful and thank you in advance.
Pataridis
I tried to convert the java code I found se kotlin and connect it (methodChannel) to my flutter application, but without any luck

How can I do Junit tests for Google Maps in Android?

I am using the Google Maps API in an Android project and now I need to test it using JUnit if possible. (I am somewhat new to both JUnit and Google Maps.) I have been scouring the internet but was unable to find anything.
The map view has dots/pins for stations and when I tap one I get a balloon popup with the name and other info. Then when I tap the balloon I get a new view with information about the location and actions to perform such as navigate.
What I want to know is, is it possible to write a JUnit test case that finds all these dots/pins, taps them, and verifies information on the new view that pops up? Additionally, I would like to change/mock the location that the GPS has and see what happens if I try to, say navigate overseas or something like that.
I do have a list view of the same locations which I will test as well, but I would like to know if there is a way to test the map view.
I would prefer an automated test script like what JUnit provides. If this is not possible with JUnit what is the best alternative?
I am working with Android 4.0 and using Eclipse.
Any help would be greatly appreciated.
In case anyone wants to know after much searching I finally found something that can test Google Maps. Things such as zoom level and I believe tap pin (method is called tapMapMarkerItem()) are supported. I have not tested the pin tap yet tho.
Apparently the awesome Robotium does not support map testing by itself. Nicholas Albion was nice enough to create an extension to provides testing support for maps on Android. Thank you so much Nicholas!
So here it is:
1. Download the Robotium jars from robotium.org (I found this helpful http://www.vogella.com/articles/AndroidTesting/article.html - by Lars Vogel)
2. Download the extension from https://github.com/nalbion/robotium-maps

Converting 'Current Location' Languages OR passing lon/lat

To whoever that can help,
My question comes from another topic # Open Maps app from Code - Where/How to find the "Current Location"?.
Did anyone successfully use the source code from martip # http://www.martip.net/blog/localized-current-location-string-for-iphone-apps with the ‘LocalizedCurrentLocation.zip’ file?
I've been trying but I'm not sure where I should place the example codes & how to 'call' the strings. I'm sorry for posting such newbie question but I have no where else to go~
I’ve been trying to work with it but I’m kinda lost. I’m not sure how to ‘call’ the localized string and use the ‘example usage’. I apologize for asking such a newbie question.
Please help me out here as I’m scratching my head over this matter. Anyone? Please~
Thanks in advance!^^
P/S: I'm actually trying to open iPhone maps from my app with directions from 'Current Location'. I know there are 2 ways of doing it; by CoreLocation (pass lon/lat) and replacing 'Current Location' with Strings BUT as I mention I'm a real beginner here and would appreciate it if anyone can advise & instruct me on which way is better & how to accomplish it. Btw, I'm using jquery and phonegap.
I have just completed the same task for current location. I came to know that, probably u also know that, we can't get current location in simulator. For just checking that is ur app working for location, u can add .gpx file and set ur current static location.
This is what I know...:)

iOS: Foursquare shout or creating event

I am working with foursquare a for the first time, having hard time with this: Is there any API from the foursquare that supports function to allow shout out? If there is can someone tell me the link. I am really stuck with this stuff..
there is a good example in github for this,hope that helps you. :
https://github.com/Constantine-Fry/Foursquare-iOS-API
This is latest and working FSQDemo works with iOS5 and Xcode4.2 tested. Please read Readme.md first, you need to create your application and put your clientid as mentioned in it.
When you run the application you can get check in and before you do that you have to click on obtain access token.
According to this A shout is Foursquare’s version of a status update or a tweet and from this forum discussion it is passing shout as parameter to url. So there may/must be a way from this sample as it allows check in.
Hope this helps.
Got it.. Thanks with this > https://github.com/baztokyo/foursquare-ios-api/blob/master/README.md

how to implement calender concept in iphone

in my application i need to implement calendar concept.i found this site http://blog.webscale.co.in/?p=244&cpage=1#comment-827 and i need to get the current month,year value but i cant get them can any help i solving this problem will be appreciated.
in this i can get only currentmonth,currentyear value(i.e 6-5-2011)today date
Try these projects -
https://github.com/voidparadox/Si-Calendar
https://github.com/klazuka/Kal
https://github.com/devinross/tapkulibrary