google-maps-markers

How to place a Marker on center of the screen on google map

青春壹個敷衍的年華 提交于 2019-12-10 10:08:15
问题 Place marker on center of the screen on google map android same as like in uber and ola apps. When moving or scrolling a google map marker should not move and it should give latlng coordinates 回答1: You need to use frame layout to align your marker in this case a image like this at center. and then fetch location using googleMap.getCameraPosition().target for more info see http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.html#target 回答2: You need to put

Add multiple markers on Google Map from JSON response

烈酒焚心 提交于 2019-12-10 09:32:04
问题 Json response: {"status":true,"message":"Successfully Alert Message","Data":[{"longitude":"70.7652417","latitude":"22.2889975","alert_message":"abcd"},{"longitude":"70.7652417","latitude":"22.2888975","alert_message":"pqr",},{longitude":"70.7662417","latitude":"22.2898975","alert_message":"xyz"}]} What I have done: arraylist = parseContent.getUsers(response); adapter = new ListViewAdapter(getApplicationContext(), arraylist); Log.d("typelist", arraylist.toString()); lv.setAdapter(adapter); for

set zoom level when marker is removed

北战南征 提交于 2019-12-10 08:23:11
问题 using javascript google-maps api I currently have it setup to remove a maker I set it up when I am adding a location like so function addLocation(map,location) { var point = new GLatLng(location.lat, location.lon); var marker = new GMarker(point); map.addOverlay(marker); bounds.extend(marker.getPoint()); $('<a href="#" class="closebutton">').click(function(e){ e.preventDefault(); $(this).parent().remove(); map.removeOverlay(marker); map.closeInfoWindow(); }).prependTo($('<li>'+location.label+

Mapping 400MB KML data in Google Maps - how?

若如初见. 提交于 2019-12-10 04:00:01
问题 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. 回答1: Well it is very easy using a

Adding markers from url with Picasso

﹥>﹥吖頭↗ 提交于 2019-12-10 03:54:37
问题 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));

Custom Marker performance iOS, crash with result “((null)) was false: Reached the max number of texture atlases, can not allocate more.”

佐手、 提交于 2019-12-10 03:54:32
问题 I have integrated Google Maps in my application and also using Google Places API. After I am getting all the results from Google Places API(around 60), I am displaying them with the help of custom marker. The custom marker which I am making comprises of "Place Image" and "Place Name" because of which I have to first draw it in a UIView and then render it as a UIImage with the help of following function - (UIImage *)imageFromView:(UIView *) view { if ([[UIScreen mainScreen] respondsToSelector:

How to change the clicked marker icon using android-maps-utils?

心不动则不痛 提交于 2019-12-10 03:21:07
问题 In my Android project I am using the android-maps-utils library to apply clustering to a bunch of markers on a map view. Whenever a marker is clicked I get notified via onClusterItemClick so I can do some action. public interface OnClusterItemClickListener<T extends ClusterItem> { public boolean onClusterItemClick(T item); } Now I would like to let the user know which marker has been clicked . The easies visual feedback would be to change the (color of the) marker icon. A icon can be set via

How do I change the Start and End marker image in Google Maps v3 API for Directions

不想你离开。 提交于 2019-12-10 02:19:20
问题 I have a route plotted fine on using DirectionsRender but I cannot find out how to replace the generic Google markers with my own. I know and use this in a normal Google Map situation but finding it difficult to do this with the directions markers for start and end. Thanks for any advice, pointers or gentle mocking if this is a silly question :D Michael 回答1: The DirectionRender takes an option called markerOptions. Quoting from the API docs: All markers rendered by the DirectionsRenderer will

Adding dynamic content to Google Maps marker

十年热恋 提交于 2019-12-09 23:43:13
问题 I am trying to create a google map with custom icon markers. I need to be able to add dynamic text to the actual marker. In other words is there anyway to add a div? I need to add prices from xml to the actual marker.. I hope this makes sense. ANY HELP would be greatly appreciated or if anyone can point me in the right direction. Thanks! MY JQUERY: function addMarker() { for (var i = 0; i < markers.length; i++) { // obtain the attribues of each marker var lat = parseFloat(markers[i][0]); var

Styling fusion table markers with custom url icons?

泪湿孤枕 提交于 2019-12-09 23:20:06
问题 I want to style my fusion table markers based on a field in the fusion table. If I use default Google markers, the following code works: layer = new google.maps.FusionTablesLayer({ query: { select: 'bizCity', from: '1yfyijoeC3GwDnnLutBI8IFOH8y2mfZ8LJGUDly4' }, styles: [ {where: "'bizCatSub' = 'Antique & Classic Motorcycle Dealers'", markerOptions:{ iconName:"star"}}, // other landmarks {where: "'bizCatSub' = 'Other moto business'", markerOptions:{ iconName:"wht_pushpin"}}, //businesses {where