For Displaying the street view in the map i am putting the following code:
mapView.setStreetView(true);
But, it is not executed it shows the following message when i write the method.
The method setStreetView(boolean) from the type MapView is deprecated
Is there any alternative for that?
No other alternative yet in place of setStreetView(boolean) method from google api 11 onwards, but if you read document carefully, it will show you blue line if street view is available of particular place
There is NO alternative because isStreetView(boolean) is NOT deprecated. I have used this method on several phones running Android 4.0.4 and it works on ALL of them. Perhaps it is deprecated on some phones but not on the Galaxy Nexus. isStreetView(boolean) works, so use it.
Related
Before starting the navigation I wanted to show Alternative routes for the user and I will watch selection from "onMapObjectsSelected". I saw this "new RouteOptions().setRouteCount(mutltipleroutecount)" instead of this do we have any other method.enter image description here
As HERE Support has already requested, we need to see the example code or your code to suggest our help.
I have yandex.yandexmapkit.MapView. I want to create the screenshot from it.
How can I get screenshot from yandex map kit?
There are two ways.
First one is using the static Yandex map API (sometimes you aren't need to use complex Mapkit):
http://static-maps.yandex.ru/1.x/?lang=ru-RU&ll=32.810152,39.889847&size=450,450&z=10&l=map
The second way is drawing MapView into Bitmap and it's not difficult.
If you don't wanna use static Yandex map API, you can use MapView.getScreenshot() method.
Also, if this method returns null, well, in short, you should try adding xml attributeapp:movable="true" to your MapView.
I have one custom class having initializeScrollBars() in its constructor.
In API 21, the method was removed, so i am not able to build the app on Lollipop 5.0.I have searched and found that, there is no alternative provided by android officially.
(https://developer.android.com/sdk/api_diff/21/changes/android.view.View.html).
I have checked this link: initializeScrollbars is undefined? and noticed that one developer suggest us to remove the method and let it on the View class by defining R.styleable.View_scrollbars attr which is not internal.
I just don't get it.
Google have answered for this issue as:
"The API has been removed because R.styleable is not public or stable. There is no safe way to pass a TypedArray into that method. Don't call the method."(Ref: https://github.com/GDG-Korea/PinterestLikeAdapterView/issues/31)
Can anyone light me a path how to remove the method
initializeScrollbars() from the custom view?
Can i simply remove initializeScrollbars() from constructor ?
What is the best way to initialize scrollbars of a custom view.?
In some old APIs numberPickerView not Working.So if i use this view in a project manifest have to be set to higher.That means program not working in old APIs.So my questions are
Is there any View give same functionality in all APIs in Android?
Or is any way to show NumberPickerView in layout when run in latest APIs and show another view to enter numbers(Like EditText) in the place of NumberPickerView when running on older version?
It was added in api 11. If you want pre-11, check this code:
https://github.com/michaelrnovak/numberpicker
You're welcome.
I want to make an android application that uses Google Maps for Android v2.
I can show a map. I can even navigate and zoom. But, when I want to search for more operations to make, I can't find any.
I want this application to work on API level 8 and above. So, I used SupportMapFragment. I heard that, if I want to make my application to work on API level 8 and above, I have to use SupporMapFragment.
I found examples about MapFragments, but unfortunately, not about SupportMapFragment.
I want to make these operations work in my application, however, they're using MapFragment:
One
Two
Is there a way of doing things like, "add marker", "show my current location", and "take position of the point that I clicked"? (using SupportMapFragment, of course. )
Thank you very much already.
Is there a way of doing things like, "add marker", "show my current location", and "take position of the point that I clicked"? (using SupportMapFragment, of course. )
Yes.
Step #1: Add the Android Support package to your app.
Step #2: Have your activities inherit from FragmentActivity from the Android Support package.
Step #3: Change all MapFragment references (Java code and layout XML resources) to SupportMapFragment.
And you're done.
All of my Maps V2 samples use SupportMapFragment, in conjunction with ActionBarSherlock (which is why you will see SherlockFragmentActivity as opposed to FragmentActivity.