google-maps-markers

Move all the markers on the map to their updated/new current location periodically as users moves

筅森魡賤 提交于 2019-11-26 18:38:22
问题 I'm developing an android app where some users opens the same activity from their devices. There is a map in this activity and as users opens this activity from their devices, their location coordinates is fetched from Firebase and a marker based on these coordinates is shown on the map. Here's my code: acceptingUserReference.child(requestID).child(key).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (dataSnapshot

How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

坚强是说给别人听的谎言 提交于 2019-11-26 18:18:03
问题 I'm returning a UIImageView in - (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker; This UIImageView loads images dynamically through a URL using SDWebImage . As the documentation says about marker info windows: Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is

Custom SVG markers won't display in IE 11

安稳与你 提交于 2019-11-26 16:35:37
问题 I'm trying to display some bus routes using Google Data Layer , and then add some custom icon markers. Works great in Chrome and Firefox, but in IE 11 I only get the routes. I get an InvalidStateError somewhere deep in some obfuscated code. the markers use a data uri with some inline SVG that is converted to base 64 strings. I've also tried NOT converting to base 64; that doesn't generate any apparent errors, but the markers still don't display. Simplified javascript is pasted below, and you

Map Markers with text in Google Maps Android API v2

♀尐吖头ヾ 提交于 2019-11-26 16:08:55
问题 I have came up with this post but it is for the deprecated Google Maps API http://tech.truliablog.com/2012/02/23/custom-map-markers-for-android-google-maps/ In the new API, I could not find an easy way to do this. In fact, I could not do it at all. Basicly I want to have TextViews as a Marker on the map with 9Patch drawable as a background of the text. Trulia is still doing it with the new API v2 in their current app. You can check it here How can I do this? 回答1: Chris Broadfoot created a

Add Marker on Android Google Map via touch or tap

安稳与你 提交于 2019-11-26 15:59:32
问题 I want to develop a Map Application using Google Map on Android. Now, I want to add marker on the map via Touch or Tap on the Map. How do I apply touch event to drop the marker on the map? 回答1: This code is Successful run I am working on that code this code is for Dynamic Draw I think this code help you more for Static or dynamic both places you can use this code double latval = Double.parseDouble(jsonobject.getString("lat")); double longval = Double.parseDouble(jsonobject.getString("lon"));

How do I remove default markers?

余生长醉 提交于 2019-11-26 15:37:12
问题 I'm using Google Map API V3 and I noticed there are a lot of markers which are here even though I don't need them. For examples, some schools or other places with InfoWindows appearing when clicking on them. Is there any way I can remove them or is it just not possible? 回答1: The only markers that should show up on the map are those you add yourself. Care to share your code or a page where we can see this happening? Update: ok, these aren't really 'markers' in the normal sense of the word,

Google Maps API - Getting closest points to zipcode

最后都变了- 提交于 2019-11-26 15:29:59
I'm in the process of adding a map to a website using Google Maps API v3 and javascript. I have a list of addresses and have successfully plotted them on the map. When the user types in a zip code, the map re-centers on their location showing the markers closest to that point. Now, I need to create a list view of the closest 3 or 5 locations to their zip code with links for driving direction. I'm stuck...and open for suggestions. The usual solution is to use the google.maps.geometry.spherical library computeDistanceBetween(from:LatLng, to:LatLng, radius?:number) method to reduce the number to

How to show multiple markers on MapFragment in Google Map API v2?

耗尽温柔 提交于 2019-11-26 15:19:52
I am using Google Map API v2 in my application to show Maps. I have followed all the steps, that is to be followed to enable Google Map in my application. public class PinLocationOnMapView extends FragmentActivity { private double mLatitude = 0.0, mLongitude = 0.0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SupportMapFragment fragment = SupportMapFragment.newInstance(); getSupportFragmentManager().beginTransaction() .add(android.R.id.content, fragment).commit(); } } If I use this code, it shows me map, but if I provide my latitude

How to get all visible markers on current zoom level

断了今生、忘了曾经 提交于 2019-11-26 15:13:46
问题 Here are some points: I have some markers on the map and records associated with it on the right panel besides the map. They are connected via numeric id, which is stored as a property of marker. All the markers are stored in an array. When the user zooms in the map, records, associated to only visible markers should be shown on the right panel. So, how to get the list of all visible markers on the current zoom level? I've searched over the internet and didn't find something useful. Some kind

Google Map V3 : Only some markers are displayed

与世无争的帅哥 提交于 2019-11-26 14:52:08
问题 I have the following code which should display several markers for places in an array and each marker on click will display an info window everything works fine except that out of 21 places I am able to display only 8 Markers. // declare Variables var geocoder; var map; var tex; var markersArray = []; // pids array 21 addreses var pids = [{ad:'251 Pantigo Road Hampton Bays NY 11946',pid:'9'}, {ad:'Amagensett Quiogue NY 11978',pid:'10'}, {ad:'789 Main Street Hampton Bays NY 11946',pid:'12'},