I noticed that Google Maps has added some black lines to the view on Google Maps. I'd like to know what they are supposed to indicate and how to turn off these black lines. see below image for reference how can I remove these black lines.
They are the MRT lines of Singapore. Apparently they appeared in other cities as well but in the right colors, I guess the MRT lines will get colored as well at some point.
Edit: They used to be colored, I just never noticed them. Seems to be a bug.
seems like a bug to me, because these lines were in colors for years before yesterday, and it is not caused by whatever Bicycling layer either, because all of my friends encounter the same started at the same time.
It's funny that non of the users who replied this thread are living in Singapore, but still trying to answer this query, apparently those replies before mine are not true.
There are reports sent to Google Singapore for further investigation, so no worries, these MRT lines will be back to be colored accordingly in the near future.
I see this in Singapore zone in google maps app, but if you want to remove it, use custom styles for your app like:
#Override
public void onMapReady(GoogleMap googleMap) {
try {
boolean success = mMap.setMapStyle(
MapStyleOptions.loadRawResourceStyle(this, R.raw.mystyles));
if (!success) {
Log.e("TAG", "Style parsing failed.");
}
} catch (Resources.NotFoundException e) {
Log.e("TAG", "Can't find style. Error: ", e);
}
}
Related
I have a problem with localizing Zendesk to french. You can see in the below screenshot the word Contacteznous which is not the correct one.
This is not the only word that is incorrect, there are some english words which are not translated at all.
I think that based on the language, the appropriate words should be taken from values-fr file in Zendesk library package. The correct word sits there but is not used as you can see from the screenshot.
The code I use for setting up Zendesk is:
public void initZenDesk() {
ZendeskConfig.INSTANCE.setDeviceLocale(Locale.FRANCE);
ZendeskConfig.INSTANCE.init(getActivity(), Constant.ZenDesk_Support_Site, Constant.ZenDesk_ApplicationId, Constant.ZenDesk_Auth_CLientId,
new ZendeskCallback<String>() {
#Override
public void onSuccess(String s) {
Identity identity = new AnonymousIdentity.Builder()
.withNameIdentifier(globals.getUserDetails().get(Constant.MM_UserName))
.withEmailIdentifier(globals.getUserDetails().get(Constant.MM_Email))
.withExternalIdentifier(globals.getUserDetails().get(Constant.MM_UserId))
.build();
ZendeskConfig.INSTANCE.setIdentity(identity);
ZendeskConfig.INSTANCE.setContactConfiguration(new BaseZendeskFeedbackConfiguration() {
#Override
public String getRequestSubject() {
return "Support request";
}
});
new SupportActivity.Builder().show(getActivity());
}
#Override
public void onError(ErrorResponse errorResponse) {
Toast.makeText(getActivity(), errorResponse.getReason() + errorResponse.getResponseBody(), Toast.LENGTH_SHORT).show();
}
});
}
I cannot understand what I am doing wrong, I followed the steps from the official Zendesk webpage. Everything is properly set in the admin back office as well. What am I missing guys?
The missing hyphen is a subtle bug in our translation file, thanks for pointing it out! It will be fixed in our next release.
The hyphen you see in the strings.xml file is a soft hyphen, U+00AD (see https://en.wikipedia.org/wiki/Soft_hyphen), instead of a regular hyphen, U+2010. As such, it is not displaying in this case, because the text is not being broken over multiple lines.
As a workaround in the meantime, you can override the contact_fragment_title in your app, making sure to use a real hyphen character (or a space, or whatever you prefer).
I think you have a ticket open with us at the moment. We'll be looking at the issue tomorrow and we'll get back to you on that channel. We can post the result back here too.
Thanks,
Barry.
Update: Thx for the answers, problem solved.
Yes code is missing, I am using Mapsforge library.
It had nothing to do with anything else than a bad comparison in a sqlite lookup
which resulted no calling of toggleColor(). Now it works just fine!
Hi I am having trouble changing the color of a circle drawn on a canvas. The other color represents a different state of the circle.
It works fine with onTap i.e when I tap the circle on the screen, but when I try to do it programmatically like
circle.toggleColor() and then
circle.requestRedraw() nothing happens.
How can I make this work programmatically?
#Override
public boolean onTap(LatLong geoPoint, Point viewPosition, Point tapPoint) {
if (this.contains(viewPosition, tapPoint)) {
toggleColor();
this.requestRedraw();
return true;
}
return false;
}
#Override
private void toggleColor() {
if (this.getPaintFill().equals(LongPressAction.GREEN)) {
this.setPaintFill(LongPressAction.RED);
} else {
this.setPaintFill(LongPressAction.GREEN);
}
}
Thx for answering
Yes code is missing in the snippet, I am using Mapsforge library.
It had nothing to do with anything else than a bad comparison in a sqlite lookup which resulted no calling of toggleColor(). Too much time spent on chasing that stupid mistake...
Now it works just fine!
I'm trying to integrate the google play Leaderboard with help of the play-games-plugin-for-unity plugin into my game.
It works fine, committing to Leaderboard an all, only one thing is not working. When I call the Leaderboard
//LEADERBOARD
if (GUI.Button(leaderboardButton, "Leaderboard"))
{
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI(Constants.LEADERBOARDID);
// Social.ShowLeaderboardUI();
}
it opens the window where I see all leaderboards. But I'm giving a specific id. This would be the behaviour I expect from the line Social.ShowLeaderboardUI(); which is commented out. The overload with a given Id (hid behind Constants.LEADERBOARDID) should start the specific Leaderboard UI according to the doc. Someone knows if this is an issue (haven't seen any report on GitHub) and how to solve it? It isn't that that big of an issue, but one click is better than two.
I tried something interesting. I changed the Id to some wrong value. Still the same behavior (opening the window with all leaderboards). Of course committing the score doesn't work anymore.
Okay, i found the error in the sourcecode of the Plugin, fixed it and resolved the problem. So here I present the fix if someone needs it. It's in the LeaderboardManager class.
This is how ShowUI is called:
internal void ShowUI(string leaderboardId, Action callback) {
Misc.CheckNotNull(callback);
C.LeaderboardManager_ShowAllUI(mServices.AsHandle(), Callbacks.InternalShowUICallback,
Callbacks.ToIntPtr(callback));
}
This should be the correct version
internal void ShowUI(string leaderboardId, Action callback) {
Misc.CheckNotNull(callback);
C.LeaderboardManager_ShowUI(mServices.AsHandle(),leaderboardId, Callbacks.InternalShowUICallback,
Callbacks.ToIntPtr(callback));
}
}
See the difference? C.LeaderboardManager_ShowAllUI instead of C.LeaderboardManager_ShowUI is called.
I'm using Google Maps v2 in an Android application that I'm writing. After creating the map and adding all the markers to it, I make all the markers draggable by using marker.setDraggable(true); for each marker on the map.
If I run the code like this, the markers are indeed draggable. However, I'd like to change the icon or color of the marker while it's being dragged, so I set up an OnMarkerDragListener, like so:
map.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {
#Override
public void onMarkerDragStart(Marker marker) {
marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));
}
#Override
public void onMarkerDrag(Marker marker) {
}
#Override
public void onMarkerDragEnd(Marker marker) {
marker.setIcon(BitmapDescriptorFactory.defaultMarker());
}
});
After adding in that block of code, though, the markers are no longer draggable. The color successfully changes in both the onMarkerDragStart and onMarkerDragEnd methods, but that's it. Can anyone explain what I'm doing wrong here, and why the markers aren't getting dragged ?
i would say that the problem comes from changing the icon rather than from settings the listener.
Please note that Marker.setIcon is not a function that is available in all the versions of the GoogleMaps V2 API. This means that probably it is not available in the library you have, or in the version of the play services installed in the device in which you are trying your app, and that could be causing any kind of malfunction.
As you can read here that function was added in May 2013. Please try updating everything, the google-play-services_lib, and the play services installed in the device.
If this happen to fix it, then you can try to change the icon only depending on the version installed on the mobile.
This is very, very strange. I've never seen anything like it. At the time I am took this screenshot, I'm not loading any overlays. First, I thought it was my internet connection where it couldn't download the tile information; but we have many users reporting the same issue who downloaded from the market. This just started happening like a week ago. Not sure why though. Anyone have a clue? Thanks!
Ok. After starting from a clean project I found these two lines of code that was the culprit.
mapView.setSatellite(true);
mapView.setStreetView(true);
They appeared back to back of each other and I looked back at the very beginning of development and they were there and it worked just fine. Apparently, this is a BUG in the MapView as I'm guessing it tries to show both SateliteView and StreetView at the same time. One would think that the latter would override the former; but I guess not.
So, the question I have is, why this all of the sudden surfaced just within the last week or so. My guess is that the Maps Application was last updated in the market on Sept 8th and maybe a day or so after updating from the market, this issue started to resurface.
As a test, can someone just add these two lines to their code and confirm you get the same behavior?
I had only setStreetView(true) and getting those annoying grey boxes. I played around with both lines with no luck. Solved it by removing both setStreeView and setSatellite from my code, goes to streetview by default.
I had the same problem with my app that uses google maps library... Because i have in my setting option where user can change view of the map to Satelite or Street, i dont use setStreetView(true) at all...just mapView.setSatelite(true or false)...
preferences = PreferenceManager.getDefaultSharedPreferences(this);
pogled = preferences.getString("list", "Street");
if(pogled.equalsIgnoreCase("Street")){
mapView.setSatellite(false);
//mapView.setStreetView(true);
}else if (pogled.equalsIgnoreCase("Satelite")) {
mapView.setSatellite(true);
}
As you can see i had mapView.setStreetView(true) but that gave me a headache... :D I hope this will help you...
I removed setStreetview(true) from my code and now its working fine i was saw this issue occured in last 2 weeks , nyway we finally solved the issue thats great
Street view is always considered as the default option.
The problem arises when we use both setStreetView(true) and setSatellite(true) at the same time. Problem will be solved like this
if(mapView.isSatellite()){
mapView.setSatellite(false);
}else{
mapView.setStreetView(false);
mapView.setSatellite(true);
}
I hope that will help
private void setUpMapTypeScreen() {
if (mapType.equalsIgnoreCase("Satellite")) {
mapView.setSatellite(true);
// mapView.setStreetView(false);
} else if (mapType.equalsIgnoreCase("StreetView")) {
mapView.setSatellite(false);
// mapView.setStreetView(true);
}
mapView.invalidate();
}
mapType is a user defined string variable. Not false the previous view type when switching to view types. that the error we made, only set the view type you required.
I had the same problem, I took out my mapController, and it fixed it. The only other thing I did different was put the mapview in a linearlayout with a textview (it used to just be a mapview only) and I played around with the mapcontroller, commenting it out.
Since those are the only two things I changed, I'm pretty sure your problem lies in there as well.
I was having the same problem and the common advice that I have got is to not use setStreeView(true) and setSatellite(true) together. Some have even suggested not to use setStreetView(true) altogether. But my code was working okay before. I had to reinstall my machine and therefore installed android SDK and other components afresh after which this started happening. So my guess is that this is an issue with some specific version But I have found out that this problem occurs specific revision of 2.2 - in my case Android SDK Platform 2.2, revision 3. I have tried running same code on 2.3 and it works correctly i.e no grey boxes.
Besides removing mapController.setStreetView(true), there is also another thing that should be added to the layout XML..
xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mapa"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="YOUR API KEY"
android:clickable="true"></com.google.android.maps.MapView>
Note the xml namespace after com.google.android.maps.MapView. After adding the namespace, the cross tiles disappeared. Don't know if it's a bug or the namespace is necessary in order for the api render the map correctly. Either way, it worked.