google-maps-markers

Draggable Marker to Update Lat and Long Fields

时光毁灭记忆、已成空白 提交于 2019-12-11 23:29:45
问题 I wonder whether someone may be able to help me please. I've put some coding together (please see below) whereby a user goes onto a HTML form, they type in an address and click a 'Search' button. Upon doing this, the location is plotted on the Google map and the Lat and Long co-oridnates are automatically entered into the associated text boxes on my form. What I would like to do, if at all possible, is for the marker to be draggable so the user can fine tune the location, and as they drag the

Google maps marker loading last record

纵饮孤独 提交于 2019-12-11 23:01:38
问题 I am trying to add a group of markers to google maps each with a infomation window. I am using a mix of php and javascript to do this, the php gets all the records from the database and then the javascript adds all the markers to the map with the coordinates taken from the database. Here is what I have so far: <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(<?=$lat?>, <?=$long?>); var settings = { zoom: 12, center: latlng, mapTypeControl: false,

plot a different marker for each place googlemap v2 android

邮差的信 提交于 2019-12-11 22:07:34
问题 I have managed to place a marker for each item in my database using their stored title and coordinates. I am now trying to change the content of each InfoWindow so that it shows information related to each place (other than the title and snippet)also each place have a different icon marker. how to give a custom icon and a different infowindow for each place? i create the different icons for marker. the information are loading in format json and the icon marker are also in my database.should i

How do I post multiple markers from a JSON array on google maps

拟墨画扇 提交于 2019-12-11 19:37:25
问题 I have an android app that takes an array from a website {"d":[{"latitude":-1.0,"longitude":-1.0,"time":"07:14 PM 01/18/2038","most_recent":"1","user_id":"4e3f2c6659f25a0f8400000b"},{"latitude":-1.0,"longitude":-1.0,"time":"07:14 PM 01/18/2038","most_recent":"0","user_id":"4e3f2c6659f25a0f8400000b"},{"latitude":-1.0,"longitude":-1.0,"time":"07:14 PM 01/18/2038","most_recent":"0","user_id":"4e3f2c6659f25a0f8400000b"},{"latitude":34.0608,"longitude":-118.454,"time":"07:14 PM 01/18/2038","most

Adding multiple markers on Google map V2

冷暖自知 提交于 2019-12-11 19:33:18
问题 Hi I am developing small android application in which I want to display map and some markers on map. I have list of latlang values and i want to display it on map. I tried this in following way : for(int pin=0; pin<pins.size(); pin++) { LatLng pinLocation = new LatLng(Float.parseFloat(pins.get(pin).latitude), Float.parseFloat(pins.get(pin).longitude)); Marker storeMarker = map.addMarker(new MarkerOptions() .position(pinLocation) .title(pins.get(pin).pinname) .snippet(pins.get(pin).address) );

The previous marker of changed input field doesn't disappear in Google Places Autocomplete

谁说我不能喝 提交于 2019-12-11 19:31:58
问题 Hi i'm using Google Places Autocomplete with 4 inputs. The problem is that when a single input field is changed the previous marker(and its infowindow) of this input field doesn't disappear from the map. How can I make the markers to be overwritten? Any answer is appreciated. Here is my code: <script> var map = null; var autocompleteOptions = { componentRestrictions: {country: "az"} }; Here are the arrays for markers and infowindows: var infowindow = []; var marker = []; setupAutocomplete

How to find optimal route to one of many markers?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 18:44:37
问题 On a map I have to arrays of markers. One's are static, let's call station . Other's also static, but they are temporary, let's call them fire . When fire is clicked shortest route must be constructed to one of stations . I use TravelMode.DRIVING. I know that I can calculate route distance, but in order to calculate I must construct route first. Is there any library to find optimal route between one fixed marker and one of many other markers? Or can you help me telling logic? I can write code

Search inside circle markers

两盒软妹~` 提交于 2019-12-11 18:08:10
问题 I need to do a search for markers that are within a circle using as parameters the radius and position of the center of the circle. Someone can help me on how serious this search. 回答1: Concept: make an array of the markers you want to search iterate through the array of markers calculating the distance between each marker and the center point using the geometry library computeDistanceBetween() function compare that distance to the radius of the circle, if it is less than the radius, the

How could i show info window for ten markers in google maps?

允我心安 提交于 2019-12-11 17:48:39
问题 dear professionals. I want to make info window for each markers on google maps. My code: google.maps.event.addListener(marker, 'click', function() { new google.maps.InfoWindow({content: content}).open(map, marker); }); show infowindow only for last marker. Please, give me example or link to tutorial. 回答1: This is a modification of my answer to this question: Maps API Javascript v3 how to load markers with a mouse click It loads an array of markers with info windows, and displays the last one

How to save a marker onMapClick?

寵の児 提交于 2019-12-11 17:43:29
问题 Hi I have this code which adds a marker when I click on the map but if i rerun the app the marker disappears. Is there any way that I can store the marker somehow and then display it ? I have read about shared preferences but I can't provide the code for it. How can I save the onmapclick action in shared preferences and then display it ?Anyone can help me out ? gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener(){ @Override public void onMapClick(LatLng point) { gMap.addMarker(new