Custom pin point on Map api v2 - android

In my app I implemented the map fragment inside a fragment. I would like to show pins on the map. I know the simple way of putting the marker on the map is easy.
However in my app I have to save all their information I have to use,two different pins , for example for girls the icon would be pink and for boys the pin would be blue.
Now I want to put some other information for example the id, name and status, age, game, latitude and longitude and so on. I do not want to show all of this information when user click the pins. I want to show the information in a new activity which would get open user click.
Please help me, how can I share the information of each marker completely and then, when the user clicks the marker the new activity should open and show related information. I have searched many tutorials on this topic prior to posting my question.

This should be useful http://googlemaps.github.io/android-maps-utils/
It has:
Marker clustering — handles the display of a large number of points
Heat maps — display a large number of points as a heat map
IconGenerator — display text on your Markers (see screenshot)

Related

Loading KML file when area visible in google map android

I am working on google maps application and I have data in KML file of 1 area. I can successfully add the layer to map when a button is pressed, Now I am searching a way to add the layer when a user viewing that area at a particular zoom level. I can able to add a layer at a particular zoom level that I want but I am unable to find a way to add a layer when an area is visible on the map any help or sample code will be useful for me.
Thanks in Advance
You can get the current area of map displayed on screen and show your layer accordingly.
Step 1 : Get the total area of map covered on current screen. You can get the region by using this link.
Step 2 : Get all the marker latitude and longitude from kml and check whether that exists between region bounds of step 1.
Step 3 : If there exists the latitude and longitude then simply draw a marker on the map.

Dynamically hide/show markers when indoor maps floor changed in android

I am creating one google indoor map application as a part of my project. As of now i just try to create some working prototype before main application gets starts. As of now i am using one college location where i can find indoor maps available.
My main goal is show markers with windowInfo on different floors locations like rooms, theater or auditorium. I just used 1st floor one room lat long and set marker as of now. But when user switch to second floor then map should hide first floor marker and have to show other available markers on floor 2. Same thing would apply for all other floor levels.
Here, my main problem is that how can i get to know exact lat long or location of particular place on floor 2 where i should have to show marker point. Is there any way where google give response of upper floor locations with lat long or some height so i can try to determine that and show marker.
Second confusion is that when user zoom in or out or else user changes floor level at that how we can handle a lot markers hide and show.
Please share your ideas and views on this. As of now i can able to put marker on only first floor. you may find that image below.
Any help would be really appreciated.
you can use getLevels ()
Gets the levels in the building. While a level is usually enclosed by a single building, a level might be enclosed by several buildings (e.g., a carpark level might span multiple buildings). The levels are in 'display order' from top to bottom.
You can also use various methods in IndoorBuilding class getActiveLevelIndex(), getDefaultLevelIndex(),isUnderground() etc
Read more about IndoorLevel
Hope it helps
Some apps include your altitude along with your the lat/long information. What you need to do is to get your altitude and keep that as a variable. Then find out what altitude each of the levels of the building are. I am attempting to do the same thing for a University and that is the only way I knew of where you could know that you are on a second or third floor. Think of it as having your x,y, and z values. Lat/Long is basically a 2d representation of the earth's surface. But, you also have a 3rd plane. You could do the following: Download a program that not only tells you your lat/long but, also the altitude. Then have a variable that is a constant for each building. (building name) (Floor number) (Floor elevation). Then when you give the building lat/long you also give the elevation variable and then it associates it with a floor number.
Ashe

Is it possible to create an android map application where the map is a custom image file?

For example, for some reason I only want a map of United States with state borders but without state names or city names. I can find such a map online(an image file), and want it to be the map in my application. But I still want the ability to get geolocation data(latitude, longitude) when the user taps somewhere on the map. Is it possible to do that? If so, where should I start? Could anyone suggest some resources?
If you create your own tiles yes it can be done with Tile Overlay
https://developers.google.com/maps/documentation/android/tileoverlay

How to make a Custom marker on google maps disappear if it is not in focus

Some of the markers in google maps appear when zoomed in. However, when a user drag the map into a different place, the marker disappears, and when you drag it again on the previous place, the marker starts to animate in front of you (I hope you are getting what I'm trying to say). I want to know if there is such a way to do that. Thanks.
The same thing happens in Google Maps Android API v2 on street names, parks, etc.
There is no support for marker transparency as of this writing. You will have to code it yourself: posting to Handler until the animation finishes and setting new icon every "frame" with increasing opacity.

Multiple marker on map

I want to show multiple users through markers on map. I want my location should be in center with marker and others are around me. I want to show different image marker for every user. I dont want to use same image for all the user's.
Any tutorial would be a great help.
You can use these tutorials and use custom Images for each user
Google Map View
Android: Double Taps on a MapView with Overlays

Categories

Resources