google-maps-markers

Google Map route dragging becomes unstable when suppressMarkers is set to true

穿精又带淫゛_ 提交于 2019-12-05 06:32:25
I have a Google Map where I can add multiple points/stops(waypoints) between source and destination route. After the route is created (google.maps.DirectionsService) and put on the map (google.maps.DirectionsRenderer), you can drag the route middle-points to adjust the route as you wish -- draggable=true is set in the constructor of DirectionsRenderer. directionsDisplay = new google.maps.DirectionsRenderer({ suppressMarkers: true, draggable:true }); The problem is when I change the route between two stops by dragging and later i again want to change the route by dragging same changed route

Mapping 400MB KML data in Google Maps - how?

拥有回忆 提交于 2019-12-05 05:07:08
Re, I have a KML file that's 400MB large - 1 week of travel and 5000km logged. It's already stripped of non-essential data. GPX file from that is around 80MB or 2.5MB zipped. KML file is around 30MB. I am not sure how many waypoints there are but must be hundreds of thousand. How would I go about mapping it on Google Maps? Is there a way to reduce the file without compromising the quality of my tracks? I am using jQuery and Google Maps API v2 or v3. Thanks. Well it is very easy using a KML file with the Google Maps API. An example would be the following: KmlLayer(http://myserver/kmlfile.kml)

How to mark the Latitude,Longitude in Google Map ?

会有一股神秘感。 提交于 2019-12-05 05:04:10
问题 I am using Google Map. I have a array that have multiple Latitude and Longitude. I have a center point of Latitude Longitude. So I want to mark all the Latitude ,Longitude that comes inside the radius of 10 meters from the center point. Activity Code: LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); double longitude = location.getLongitude(); double latitude = location.getLatitude();

Google Maps v3 FontAwesome5

落花浮王杯 提交于 2019-12-05 04:10:30
问题 I am trying to create a googleMap that uses dynamic fontAwesome markers I can't seem to be able to set 'Font Awesome 5 Free' as the font to be used, though. I can set 'Fontawsome' which works, but is not a webfont (It's a .TTF installed in MY system) var marker0 = createMarker({ position: new google.maps.LatLng(33.808678, -117.918921), map: map, icon: { path: google.maps.SymbolPath.CIRCLE, fillColor: '#F00', fillOpacity: 1, strokeWeight: 0, scale: 15 }, label: { fontFamily: "FontAwesome",

Android Make Disappear or remove the blue dot on the map v2

久未见 提交于 2019-12-05 03:39:47
I'm trying to replace the blue dot on the map of my app. My intention is that instead of the usual blue dot, show an icon shaped plane. I achieve this and it works perfectly as follows: //... GoogleMap.OnMyLocationChangeListener myLocationChangeListener = new GoogleMap.OnMyLocationChangeListener() { @Override public void onMyLocationChange(Location location) { LatLng loc = new LatLng(location.getLatitude(), location.getLongitude()); try{ myPositionMarker.remove(); } catch (Exception e){ //.. } myPositionMarker = mMap.addMarker(new MarkerOptions() .flat(true) .icon(BitmapDescriptorFactory

Adding markers from url with Picasso

守給你的承諾、 提交于 2019-12-05 03:27:46
I'm adding markers to my map from a url using the Picasso library As a marker isn't an ImageView I tried to use a Target instead for(int x =0; x < mapIcon_url.length; x++){ Picasso.with(getActivity()).load(mapIcon_url[x]).resize(marker_size, marker_size+15).into(new Target() { @Override public void onSuccess(Bitmap b) { bitmapMarker = BitmapDescriptorFactory.fromBitmap(b); //create marker option if(b != null) markerOptions = new MarkerOptions().position(marker_position).icon(bitmapMarker)); else markerOptions = new MarkerOptions().position(marker_position).icon(BitmapDescriptorFactory

How do I create a grid in google maps api v3

…衆ロ難τιáo~ 提交于 2019-12-05 02:59:26
问题 I'm new at this. What I'm trying to do is, created 2 markers (they are draggable), there will be grid between them, like http://prntscr.com/4nx9f3 . When I change one of the marker, grid should be changed. I am trying to draw with polylines. By the way i can not get latitude or longitute with marker1.getPosition().lat() . thanks for any help... all my code: <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta

Google Map .InfoWindow Set Height and Width

和自甴很熟 提交于 2019-12-05 01:39:22
How do you set the size and width of a google map InfoWindow ? I looked on the api page and only found a maxWidth method. Edit: I have tried a few things. So far none of these work: var markerInfoWindow = new google.maps.InfoWindow({ content: markerHTMLString, maxHeight: 400, //Doesn't work maxWidth: 400, //Doesn't work width: 300, //Doesn't work height: 300 //Doesn't work }); Also say markerHTMLString is equal to this: <div class = "MarkerPopUp"><div class = "MarkerContext">Text</div></div> I have tried these three options as well (none of them worked) .MarkerPopUp { height: 300px; width:

Google maps API: Marker image positioning

点点圈 提交于 2019-12-05 01:27:49
I have changed the image that I use for a marker on Google maps. The new image is much wider than the old one and I have noticed that the marker is aligned with the lat and lng so that the marker rests with it's horizontal midpoint over the lat and lng . This is not what I want, I want to have the lat and lng aligned with the markers left hand side - I want to offset the marker from the default position by about 80px to the right. Try this on for size. var markerImage = new google.maps.MarkerImage('/img/icon/here.png', new google.maps.Size(80, 80), //size new google.maps.Point(0, 0), //origin

How to check if there are any markers within a Google Maps viewport?

牧云@^-^@ 提交于 2019-12-05 01:10:44
问题 What is the most effcient approach to check if there are any markers within a viewport? A perfect solution wouldn't require checking all the markers one-by-one if it's contained by the viewport. 回答1: The best solution that I came up with is to on the application launch, create an array with reference to markers - sorted by 1 coordinate, i.e. latitude get viewport's bounds with GMap2.getBounds() (as paullb suggested) take lower latitude of viewport boundaries and look for it in the array