i want to develpe map like below link
https://developers.google.com/maps/location-based-apps
Currently i am Using Compute on map to capture scroll , i am using google api but its taking long to get responce data and drop pin
is there any native way to do this?
thanks
In android you need events fired on map change.
Have a look at: How to catch that map panning and zoom are really finished?
and http://mpcabd.igeex.biz/android-map-view-with-pan-zoom-events/
Related
I am building an android app and I am trying to figure out a way to place custom markers in Google Streetview, something like hotspots that display images when clicked and move along with the camera so that they go off screen if necessary. I have no experience at all, so I would at least understand where to start studying.
Would it be possible with CSS position properties?
Edit: I am searching for a way to locate them in street view mode, not in map mode.
Marco! Work with markers is very simple. For drag-drop marker you should override methods onMarkerDragStart, onMarkerDrag, onMarkerDragEnd. All click on marker call infoWindow. So, you can set your InfoWindowAdapter to map and implement your code logical here.
For concurrent moving camera with marker (right me understand?). Unlike ios version of google map, you can catch only final position of your camera (analoge idleCameraPosition on ios). So, i think you have to move marker first, and after it set camera to marker position
The best way to understand simple things of android google map is https://developers.google.com/maps/documentation/android-api/signup
I need overlay an map image on a MapView, which will hide the the real map from the user
when user offline i want to show fake map instead of
Thanks in advance
Besides photoshop, you can put a basic image view on top of the map, but it wouldn't react the same way the map does to touch inputs. Not sure what goal is. If you want offline maps, there's always this
https://github.com/osmdroid/osmdroid/wiki/Offline-Map-Tiles
I am trying to plot some markers on my Application using Google Maps.Initially the application displays some markers at around current location.Then after panning on map new markers have to be displayed on new camera position.This should be displayed after the user have stopped panning.Currently the markers are stored in remote database.After user have stopped panning markers have to be loaded by calling webservice.
The problem is that how can i detect the panning on map and when the panning have stopped.Google maps OnCameraChangeListener() cannot be implemented because it detects all changes on map including zoom change thru code also.I have to detect the pann change thru touching on map only because there is lot of zoom and camera changes thru code also.
I followed the github link
Actually I am not getting the correct idea how to implement the MapStateListener in my map View activity.
and many other links in Stack Overflow but cannot get any solution while implementing.
I'm implementing a feature in my app that allows user to manually locate themselves on a map. So I use a pin to represent their location and let user drag it to the place they currently are. The simple solution is to use setDraggable(true) on the marker, but this requires users to hold the marker for 3 or 5 seconds until it is draggable. I think this is quite confusing for many user to use the feature. So, what I want is to make the dragging more responsive by letting users drag them immediately without having to hold it for a while - like how Foursquare does!
What should I do to implement my own dragging feature? If you have any suggestions, please help me and thanks.
Check out the Hailo application. They have a neat workaround for this. It only works when you have one marker to drag.
The trick is to pan the map, instead of moving the marker. They just keep the marker in a view on top of the MapFragment (it's not actually a Marker on the map).
You can then use the map's cameraPosition.target as the location of your marker.
I'd like to dynamically update the map/ load new map overlays every time my user moves it a certain amount of distance. How do I go about doing this? Is there a listener for every time the user moves the map? Most likely I'd just measure the distance between the center points.
Thanks!
Try this to detect the map movements:
http://pa.rezendi.com/2010/03/responding-to-zooms-and-pans-in.html
On start and after the map has been moved, you should save the current map center. As the article suggests, track ACTION_UP to determine when the user has finished a map movement. Then, compare the new map center with the old map center. To get the map centers use MapView's getMapCenter():
http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MapView.html#getMapCenter()
EDIT: I have done some additional work on this, and have a complete application with code for your enjoyment. This blog post explains a timer solution to this and contains a link to Github source:
http://bricolsoftconsulting.com/extending-mapview-to-add-a-change-event/
The map interface unfortunately does not include any listeners to monitor map actions (zoom/pan). You'll need to set up a timer of some sort that checks the center/zoom levesl to figure out if things have changed and update accordingly.
You could do this by overriding the onTouch(...) method in your Activity (so that every time the user pans the map, you could recalculate the map boundaries). You would need to know the map's zoom level and boundaries, etc, in order to load these overlays based on map distances.