How to show custom locations in google map in flutter? - android

I have some locations stored in firebase and when the user wants the location it should display those locations in Google map. how can I show those locations in google map that is integrated with my flutter app?

It depend if you want only move camera to wanted location or if you want to display location on map using Marker.
Either way, you will need to get these locations from firebase to your app.
For adding Markers to your map follow these guidlines. If you want only changing camera position try method animateCamera() GoogleMapController.

Related

How to update latitude/longitude in Android on google maps?

I am developing an indoor location application where the latitude/longitude will be updated from gathered sensor data. I cannot find any API that assists with simply updating the latitude/longitude on a map as that is literally the only thing I want to do. I do not want to use GPS data as the intent of the application is for indoor locations where GPS signal is heavily challenged i.e. under ground parking. Did I maybe miss something in the google maps API that someone can point me too? I will be calculating the new latitude/longitude using old lat/lon data and the sensor data (accelerometer for example).
So long story short, I want to update the marker on the map using sensor data only and I cannot find a library function in the API that allows me to update latitude/longitude on the map. Is there anything that can do that based on the new latitude/longitude I calculate?
You should save a reference (1) of the marker that you first create, and then update (2) his location.
1)
Marker marker = mMap.addMarker(new MarkerOptions().position(firstLatLng));
2)
marker.setPosition(newLatLng);
Actually, if you want to know more about updating all map features take a glance at google map API
But, if you are running out of time and want a quick fix to your lattitude and longitude updates every time then have a look at this receiving location updates

Get the distance between two geo points - offline map

some applications using an offline map and them can get the distance between two geo points. like Maps.ME application .
Get instant access to detailed maps of all countries from anywhere in
the world! No internet connection is required.
Do they use Google map or using another map or custom map?
at this app I can specify two locations and it get me ~time/~distance between them locations.
How can use like this map as offline map ?
Its using open street map.
Check out openstreetmap.org for more information.

How to get current Location in ArcGis map In android using Imagery Map server

I am working In an app to develop a custom ArcGis map. I am able to show the map using base map url. I am using following fragment of code
mapView.addLayer(new ArcGISTiledMapServiceLayer(
"http://maps.ocparks.com/arcgis/rest/services/Imagery/2013_Imagery/MapServer"));
As this map shows a particular region (orange county). now i want to get current location and show on this map. is there any way to do this? after going through several docs of ArcGis I just came to kmow that to show current location the url of base map should be --
http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer
but for imagery map server how to show current location. if any one know please help me
Till now it is not possible , may be using javascript it can be done.
for getting current location we should use World_Street_Map as a base layer

Draw path on google map during Driving/Walking

I am working on the application that require the draw the path on the google map. Here Starting point is the current location(latitude and langitude) of the user and when user change the place(walking/Driving) then as per the moving position get the user's current location(latitude and langitude) and draw the path on the google map as per the user's location.
I able to draw path between fix point.For that I am refer this LINK.
Thanks.
Use the Android Location API an example: http://www.vogella.com/articles/AndroidLocationAPI/article.html
and when you get your position, send the coordinates to google maps with an overlay for example.

How to use built-in google map application to display many place markers based on data

I am working on an android application where i need to show many offices of an organization on map. I am using web service to bring this data and populate place markers on map. I have used MapActivity , MapView and Itemized overlays and its all working good.
The disadvantage of this approach is that i don't get additional useful menu options which comes when i use map inbuilt application. I know how to invoke and use Intent to launch goggle maps from application but facing some constraints regarding adding multiple markers using my location's data. I use following code to add a place marker on specific latitude and longitude.
Intent searchAddress = new Intent(Intent.ACTION_VIEW,
Uri.parse("geo:0,0?q=48.19858,16.37164 (My Place)"));
startActivity(searchAddress);
I have more than once location data (latitude , longitude and description) which i need to add as place marker or pin on the map. GEO URI scheme used to invoke maps inbuilt app doesn't give enough flexibility to add more than one marker.following are possible geo URIs.
a) geo:latitude,longitude
b) geo:latitude,longitude?z=zoom
c) geo:0,0?q=my+street+address
d) geo:0,0?q=business+near+city
None of these URI schemes allows me to add more than once location pin or marker on the map. Can anybody share their experience on how they added multiple place markers on invoked inbuilt map application using application data ?
Is is true that MapActivity is the more efficient solution for such situations ? I believe it would be better to use inbuilt apps allowing more options to user of android and flexibility.
The built in maps application will not display more than one location. You need to use a MapView in your application and add them locations to your overlay. Here is an example of how to add markers to a map view.

Categories

Resources