google-maps-markers

why setMap(null) is not working google maps api v3?

大城市里の小女人 提交于 2019-12-03 07:29:25
I am using google maps api 3.9 .In app user can add marker or delete marker.when user click on map an Infowindow will be displayed.in which user can enter name,lat,long and click the save image as follows: google.maps.event.addListener(map, 'click', function(event) { point = new google.maps.Marker({ position: event.latLng , map: map , icon: 'resource/image/mapIcons/point.png' , id: id , type:"point" }); type = point.type; newPoint = true; existingPoint = false; markerObj = this; inputInfowindow.setContent("<table style='width:92%;' id='inputTable'>" + "<tr> <td>point</td> </tr>" + "<tr> <td>

How to correct smooth moving the marker in google maps v2?

旧街凉风 提交于 2019-12-03 06:25:05
问题 In my application needs to display a smooth "move" google maps marker from one point to another. I use the following method for the animation: public void animateMarker(final Marker marker, final LatLng toPosition, final boolean hideMarker) { final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mMap.getProjection(); Point startPoint = proj.toScreenLocation(marker.getPosition()); final LatLng startLatLng = proj.fromScreenLocation(startPoint);

How to use Google Maps to search my own location data (Same functionality as Places search API, but for my own “places”)

时光毁灭记忆、已成空白 提交于 2019-12-03 05:21:19
问题 See related question: google maps custom local search / search control I know I can create Custom Locations and Information Windows in a Google Map e.g. http://code.google.com/apis/ajax/playground/#info_windows_sharing_v3 And I understand that Local Search can find near-by places (public ones) e.g. http://code.google.com/apis/ajax/playground/#localsearch_with_markers However my question is simple: how do I combine both? How do I enable the same as the local/places search functionality but

How to change icon on Google map marker

微笑、不失礼 提交于 2019-12-03 04:48:02
I want to use my customize icon on Google map, and added icon url on the code. But it's still not reflecting on the map. Can anyone suggest, what i am missing here. Why icon is not changing, after adding the icon url " http://google-maps-icons.googlecode.com/files/sailboat-tourism.png ". <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var markers = [ { "title": 'This is title', "lat": '-37.801578', "lng": '145.060508', "icon": 'http://google-maps-icons.googlecode.com/files/sailboat-tourism.png', "description":

Can I change the marker in a Google Maps embedded map (iframe)?

China☆狼群 提交于 2019-12-03 04:34:51
I know I can do it with the Google Maps API, but do you know if there is a way to change the marker in an embedded Google Map? I want to replace the default "A" button for a "B" button or the marker with just a dot in the middle . I haven't played around with embedding Google Maps before (I generally go straight to the API for stuff like this). I tried a couple of approaches: I figured maybe the embed syntax would be the same as the static maps api. So I grabbed a static maps URL, copied the markers param from that and tried sticking it into the iFrame URL. This didn't work so much. I created

How can i access all marker on my GoogleMap-Object (android maps v2) and set them (in)visible?

流过昼夜 提交于 2019-12-03 04:00:45
i am currently trying to implement an ActionBar-Button that on usage sets all my markers on my GoogleMap-object visible or invisible. My problem is that i don't know how i can get a reference to all my markers once they have been created and are shown on my map. Im looking for a solution where i stash all my marker-objects into an array, that i can access in other parts of my code aswell. is this approach reasonable? here is what i am thinking of: private Marker[] mMarkerArray = null; for (int i = 0; i < MainActivity.customers.size(); i++) { LatLng location = new LatLng(mData.lat, mData.lng);

Google Maps API - Radius search for markers using Places?

北城余情 提交于 2019-12-03 03:58:35
问题 I have set up a Google Map using API v3. The map has a number of markers with infoboxes attached. I am looking to set up a search box outside of the map for the user to input an address and then have the nearest markers returned based on the distance away (such as a radius search). From the API documentation I think I need to uses the Places services. Can anyone point me in the right direction? 回答1: To do a radius search with the API, use the Geometry Library google.maps.geometry.spherical

Google Maps API v3: Is there a callback or event listener for a setMap() event?

て烟熏妆下的殇ゞ 提交于 2019-12-03 03:56:21
问题 I am using Google Maps API v3 on a website I am developing. I have a drop-down box beneath my map which allows the user to switch between different sets of markers to be displayed on the map. Each marker is displayed using marker.setMap() . My problem is that the map sometimes takes a long time to display the new markers, especially in IE. I want to show a "Loading" animation while the map is switching markers. But I don't know how to detect when the map has finished displaying the new data

how to remove a single marker from google map

别等时光非礼了梦想. 提交于 2019-12-03 03:30:28
I am working on google maps i am trying to add markers to a google map and then tried to remove it but now as i have done both adding and removing with the code below <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>MapsApi</title> <style> #map_canvas { width: 100%; height: 500px; background-color: #CCC; } #menu_bar{ width: 100%; height: 150px; position:absolute; bottom:0px; background-color: #CCC; border-top:1px solid red; } body{ padding:0px; margin:0px; } </style> <script src="https://maps.googleapis.com/maps/api/js?sensor

Google Map add marker using place ID

♀尐吖头ヾ 提交于 2019-12-03 03:22:07
I am trying to place a marker into Google Maps using its PlaceID. I have the map working and displaying and can also add markers (using Lattitude and Longitude) into it. The code below is what I am using to try and make the marker display using its placeID however it is not displaying. function addPlaces(){ var marker = new google.maps.Marker({ place: new google.maps.Place('ChIJN1t_tDeuEmsRUsoyG83frY4'), map: map }); } This function is called after the map has loaded. google.maps.event.addDomListener(window, "load", addPlaces); If you want to place a marker on the map at the place with the