At today's development, I have some new questions and as follows:
1、When I open GPS service,call the method mapView.startUpdatingLocation(),it is locating the current position very well,but if I close the GPS and does not set the default position,is it can locating automatic by network and show an blue arrow in the map?
2、I create a class which implements LocationSource interface and then call
mapView.setLoactionSource and set the locate way is network,but when I open the application to load the map,I found the position is United States. It does not locate the current position where I am. is that right?
3、Sometimes,loading the map too slowly to loading the data timely, are there offline map to use?
4、In your office website,there some introduce for the region layer like this:
After zooming out a certain amount, the Business Layer will disappear and the Region Layer will appear. The Region Layer displays a set of hand-picked cities and towns, with a custom image for each place. Tapping one of the pins will zoom you into that place, giving you an overview of the area.
What is mean "the business layer will disappear and the region layer will appear"?I did't find the phenomenon.
I am a developer on the Citymaps SDK, I will do my best to answer your questions.
1) If you use the default location source built into the SDK, it will never find your location with GPS off.
2) If you implement LocationSource yourself, it is up to you to determine the user's location and tell the LocationChangeListener when the position has changed. Have a look here at the default implementation of LocationSource for more details: https://bitbucket.org/citymaps/citymaps-android-map-library/src/5a8bafc9638a99c122ba671683299185f9796a48/src/com/citymaps/citymapsengine/CitymapsLocationSource.java?at=master
3) We do not currently have offline maps, but it is a feature we are working on. It should be released within the next month or so.
4) If you look at the Citymaps application in the Play Store, or the SDK sample, you will see what this means if you zoom the map in and out. It is difficult to explain further than what was stated above, so you should check out these two examples and see for yourself.
Related
First of all if this one is a duplicate, please refer me to the original thread(s), as I have failed to find the exact thing I was searching for.
Basically for some time now I am developing an application for the client and it was all going well up until this point.
The client requests to be able to
I) While online:
Access Google map
Set the point by clicking on map
Store a portion of the map around the above mentioned point locally as per the radius he/she selected (eg. 3km)
II) While offline:
Access the map he stored in above steps.
The application should draw the path as he moves as per GPS coords received from another device via BT.
The ability to zoom in/out, scroll around map and everything else that standard google map allows.
I am completely lost on this one and would like at least someone to point out the right direction for something like this.
I'm well aware how to handle most of the above while Android device is online, but have no idea how to do this while offline.
I pretty much need help with I-3, II-1, and maybe II-3.
PS. I don't really need BT tutorials and guidance (mentioned in II-2), that part is handled, I just pointed out the source of coords.
Cheers
You can use TileProvider. The TileProvider provides the images that are used in the tile overlay. You should be able to save portion of map and create your own tileprovider and access tiles locally.
Hello my name is James,
I am self-learning how to develop android applications, I have designed few basic apps – to name a few calculator app, notepad, percentage calculator for android. After developing few small basic apps, I am planning on making more advance apps, I am planning on creating an app that allows the user to tag their location on google map or geotag images using the application, which will only be visible to them. For example, the user can tag location to a map and later on get directions to that location or take an image of a location and geotag it to the map and add some sort of description to it.
I have been searching on google for some time now, on how I can go about designing this app but I haven’t really found any tutorial / guides how to implement the image geotagging / location tagging to google map.
Please can someone give me some guide, something to read upon or maybe correct me if am not searching for the right materials.
So far, I have carried out searches including:
How to add google maps to my android application (I found a good guide for this and I understand how I can do this)
How to implement geotagging on your android application (Haven’t found any useful material apart from few applications released on play store)
How to implement location tagging (Haven’t found any useful material for this either)
I found a video on YouTube where the person has designed a similar app that I am planning on doing http://www.youtube.com/watch?v=_V49bXXtnvU but other than I have only come across videos / guides that shows how to add google maps to your android application something like http://www.youtube.com/watch?v=awX5T-EwLPc
Thanks for your time.
I'm not sure if you found your answers already, but in case you or someone else is still looking:
- http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html
I found that tutorial helpful in getting started with MapsActivity. If you are using Android Studio then just start a new project with the main activity selected as Map activity. This will start you off with a lot of the necessary code for starting the Google Maps API. It will walk you through how to get your google api key for your app.
Once you have that set up, then look at the several listeners that are available for the map. Some that you may want are Map.setOnMapLongClickListener, Map.setOnMarkerClickListener, Map.setOnMarkerDragListener. These will help you decide what to do with locations on the map.
Look at the Marker class to be used Google Map. You will set your tags/markers with this class. You can replace the default marker with your image if you like or create your own custom tag. https://developers.google.com/android/reference/com/google/android/gms/maps/model/Marker?hl=en
You can use LocationManager to get your current location. Here is a simple tutorial: http://javapapers.com/android/get-current-location-in-android/
If you plan on providing Camera within your app or get images from gallery, you should review the Camera Class :
http://developer.android.com/guide/topics/media/camera.html
and a simple tutorial:
http://www.tutorialspoint.com/android/android_camera.htm
I would add one feature at a time when starting your app project.
Create the map with working key and make sure it displays a map.
Then, add a marker on your current location (on an emulator, you will have to set the default location because it will not have gps).
Then, allow the user to add a marker by i.e long pressing on a map location.
Then, open a dialog box of choices when long pressing on map, i.e tag location, tag with custom tag, tag with camera image, etc.
This might be a bit off-topic. But I have been searching a lot for this and could not find anything.
I am developing an app, which would show to the user the near-by activities happening based on his current location. The client wants to show all the near-by activities in a map like view. But the issue is that he does not want to show the exact locations of the activities, due to privacy issues. Just a rough view of the things happening around in a map would be ideal.
Is it possible to prevent showing the exact details using a google map. Is there any alternate visual representation for this scenario.
Kindly help.
You may send to Android application a LatLng that is randomized and accuracy value in meters. This way you can represent an activity using Circle class with optional Marker in the center, so you can get info windows easily.
iam a newbie for this kind of development. im trying to create an android application which involves GPS tracking. i am using Nutiteq because i have to use openstreetmap as the default map. please help me.
What do you mean by GPS tracking? If it is showing GPS location on map, then Nutiteq sample project (https://github.com/nutiteq/hellomap3d/) has several samples:
a) Simpler HelloMap3D demo has line-based animated GPS display, this is easier to use
b) AnimatedLocationActivity in AdvancedMap3D shows OpenGL-based animation for more advanced requirements
If you want to save locations and show tracks as lines or points, then you need a bit extra work. I would save data to Spatialite database. Same hellomap3d project has Spatialite layer for viewing, but there is also SpatialLiteDbHelper.java which has method insertSpatiaLiteGeom() which enables to save data persistently to the database, this is something you need to implement in your app. For viewing lines and points there is existing sample code: see VectorFileMapActivity.java.
GPS tracks tend to become long and slow to render. For this there is special method to simplify data: use something like in VectorFileMapActivity:
dataSource.setAutoSimplify(2, metrics.widthPixels);
This tells that line data (it does not apply to points) will be simplified based on map zoom, while after zoom in you will see full data (for smaller map area). This will enable to show GPS trakcs if you have many of them visible with thousands of points.
The Open GPS Tracker project uses open street map. Have a glance on their sources.
Hey I am trying to find a way to create a golf cart map for android devices using the Google API's and Google Maps. I have an API key from google and did the basic tutorial already. I create a custom Google map that I want to implement in the application (all i really had to do was turn the bicycle map on). So what I am trying to do is program my custom map into an android application so people can use it as a GPS while driving on Golf Carts. I would greatly appreciate any advice to get me started because I haven't been able to find out how to do this in the Google API reference.
You will have to create your own extended version of MapView. override the onDraw method when you extend and apply your logic.
http://developer.android.com/guide/topics/ui/custom-components.html :documentation link which can help you creating a custom control.
I would suggest extending the MapActivity class and use Overlays to draw any additional 'Golf' features you want to add e.g. the location of the user. As they move about in the golf cart you could keep their position static, with respect to the screen e.g. keep them centered, and scroll the map in whatever direction they are travelling. An additional aspect to keeping them centred is to also keep the map with North pointing upwards, and provide some additional directional feedback to the user such as an arrow showing their direction of travel e.g. if the user was travelling east, an icon showing their location would be in the center of the screen with an arrow pointing east, with the map scrolling from right to left.