How to add basic grids to GoogleMap Api v2 - android

I would like to add the basic grids to my GoogleMap that use to be on maps.
I read the docs but didnt found anything that could help, maybe the TileOverlay or GroundOverlay can do the trick, but i didnt found any examples or tutorials, not even in the official samples.
Can anybody suggest me some ways that could work ?
E D I T :
Yes i would like gridlines like this:

Seems like I have a code that does exactly that. I used it only for debugging, but here it is: DebugHelper.java.
Some notes:
you will also have to copy SphericalMercator.java
change IGoogleMap to original GoogleMap and IProjection to Projection
clusterSize parameter is in degrees, so you will have to change it depending on the zoom
finally: call drawDebugGrid in onCameraChange.
If you want to see it in action, you may run the demo of Android Maps Extensions. The only change you need to make to see grid is setting DEBUG_GRID to true on one of the first lines in GridClusteringStrategy.java.

Related

How can i create a google maps marker that i customize at runtime android kotlin

How can i achieve a marker like the one in the picture below,that i can customize for every item at runtime,based on the item's attributes,in this example,price.
I have some knowledge about markers and customization,so im not a complete newbie,for example i was able to achieve this:
But in this case nothing is dynamic,the marker is the same for every item so it's not like what i want to achieve.
Have you looked at the utility library? It supports an IconGenerator class which you can use to display text on a marker. This seems to accomplish your use case.
See: https://github.com/googlemaps/android-maps-utils

How to put drawable for polyline pattern in Mapbox?

Just like for marker where we can put drawable for its icon, such as with Marker's .SetIcon(), how to do the same with Mapbox's polyline?
I've searched Google but, CMIIW, seems like there isn't a way to do that yet? Some links I think are related:
Github - Dotted Polyline on Android
Runtime Styling API
Any suggestion?
Unfortunately, Polyline doesn't support custom patterns. What I'd suggest is using LineLayer with PropertyFactory.linePattern() where you pass ID of an image previously added to the map via MapboxMap#addImage().
Here is an example activity that uses LineLayer.

Android timeline aka lines between two views

I am trying to implement a layout which is able to draw lines between views. Here is a sample picture of a library that does the job but seems outdated, just like other solutions I've found:
Any ideas or code samples?
As #SígvardrÓlavrsson pointed out, google material steppers represent the best solution here: https://material.io/guidelines/components/steppers.html

Remove series indicator/plot legend AndroidPlot

I realise AndroidPlot has a forum but it isn't the most active so i'll chance my arm here...
I'm trying to remove the series indicator or plot legend from my XY plot using the AndroidPlot library. I don't want to remove the series from the plot itself, just the legend.
I've seen it done on AndroidPlot examples but with the limited documentation it's difficult to find methods to do the stuff like remove the legen
OK I have the following code to do this. This is not tested on the very latest version but hopefully is still good.
if (!mKeyOn)
mDynamicPlot.getLayoutManager()
.remove(mDynamicPlot.getLegendWidget());
if (!mDomainLabelOn)
mDynamicPlot.getLayoutManager().remove(
mDynamicPlot.getDomainLabelWidget());
Looks like the trick is to get the layoutManager.
You can also use Androidplot's XML Styling with Configurator and thanks to reflection remove plot legend by simply specifying it's visibility in XML layout file like this:
<com.androidplot.xy.XYPlot
...
androidPlot.legendWidget.visible="false"
... />
If there is no need to change your legend dynamically, I think it's better to place such a styling in the XML file.
Looking at the code, setLegendWidget only updates the local handle for the LegendWidget but does not update the LayoutManager, which is what is actually invoked when it comes time to do the drawing. If you implement Ifor's (upvoted) suggestion you should have success since it interacts with the LayoutManager directly:
plot.getLayoutManager().remove(plot.getDomainLabelWidget());
Another option is to hide the Legend like this:
plot.getLegendWidget().setVisible(false);
Provided (in light of the info above) that you are not also trying to substitute/remove the legend widget with a previous call to setLegendWidget().
If you want to remove only one (or a specific) series legend from the legend widget simply use:
yourSeriesFormater.setLegendIconEnabled(false);
This worked for me.

How can I suggest a feature to the Google Android team?

I have been looking for a easy way to add borders to custom made Views (Compounds or whatever), and the only answer I found was that there is no built-in support for that. Instead there are suggestions that you should add Views on top/below the View you want borders on and a bunch of others really messy ways to get borders.
Coming from the .NET-environment that is pretty brutal to have to do ugly workaround and "hacks" to get something as simple as borders.
Thus, I want to suggest that feature to the Android team. I'm not sure how they can have missed it, but it is surely missed =)
So, is there any official way to suggest a feature in the SDK/framework? I have looked around a bit, but can't comment on their blogs, no e-mail addresses as far as I can see.
Put your suggestion at google code.
You can easily create a Drawable subclass that draws whatever border you want and reports the padding for that border, and sets it as the background of the view you want to have drawn with a border. Or set it on a FrameLayout to have the border placed around the other views inside of the frame.
sorry, 8 years later. At the link below there's a Feedback section with a link to Feature Requests
https://source.android.com/source/community.html

Categories

Resources