google-maps-markers

Is it possible to drag Google maps marker and drop it in ListView?

半城伤御伤魂 提交于 2019-12-02 10:44:39
I am trying to catch data from Google Maps Marker, and want to know is it possible to drag Markers to ListView(below link) then access the (lat, lng) or place name etc. data ? http://imgur.com/l4DKnZu Here is a possibility. It's not specifically Android, but it might be useful, maybe. So, when the client drags the marker 60 pixel from the border of the map, the map starts panning. So, at that 60 pixel point, I get the markers out. Okay for you? <style> table { width: 100px; float: right; height: 500px; } table tr { height: 20%; } </style> <table id="mytable" border="1"> <tr><td id="hello"

X marks along the direction

大憨熊 提交于 2019-12-02 09:36:59
I have never worked with Google maps API. For the school project I am working on; I need to get a direction between two locations (this is easy part and I think I can do this), However I also need to put an X mark; at every 10 miles along the way. Is this even possible? Thank You. Ok, here's a working solution that draws markers every 200 miles (I was working on big distances to check it worked on geodesic curved lines, which it does). To make this work for you, just change all the coordinates, and change 200 to 10 <!DOCTYPE html> <html> <head> <title>lines with markers every x miles</title>

Google Map custom Marker Out of Memory Error (API V2)

ε祈祈猫儿з 提交于 2019-12-02 09:31:47
问题 I'm using the following code to set marker with user's own image in his/her gallery. But I get out of memory error all the time so I guess my implementation is wrong. Another interesting behavior I found is that if the marker isn't in the view, the error doesn't occur immediately. But once I move the camera to where that marker is the error appears again. (In short, I never get a chance to see my image) Codes I use: //on button click, send user to gallery to choose image he/she wants to use

Google Maps JS API v3 and looping animated gif's

好久不见. 提交于 2019-12-02 09:17:41
I can't seem to loop animated gifs with the Google Maps API. It plays the animation the first time around but will not play it again after that. Can anyone point me in the right direction? I have a lot of code in this file so I have dragged out the important bits, I'll happily put up some more if needed. var marker = new google.maps.MarkerImage( 'library/img/gmap_marker.gif', new google.maps.Size(100, 100), new google.maps.Point(0, 0), new google.maps.Point(100, 100) ); var shadow = new google.maps.MarkerImage( 'library/img/gmap_shadow.png', new google.maps.Size(100, 100), new google.maps

How to add multiple (separated with a plus symbol) waypoints to a map

久未见 提交于 2019-12-02 09:08:24
问题 Thanks to geocodezip , I have managed to create a map with directions functionality and XML markers loaded. There is a problem left though: How can I add waypoints to it? They should be separated by plus symbol or something else appropriate. Here is the current code: <script type="text/javascript"> //<![CDATA[ // global "map" variable var map = null; var rendererOptions = { draggable: true }; var directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);; var directionsService =

Why only the marker of the last input appears in Google Places Autocomplete?

百般思念 提交于 2019-12-02 09:08:00
Hi, i'm using Google Places Autocomplete with 4 inputs, autocomplete works fine, but only the marker and infowindow of the last input appears. Can someone tell me where is the problem and why the markers and infowindows of other inputs don't appear on the map? Any answer is appreciated. <!DOCTYPE html> <html> <head> <title>Place Autocomplete</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> <script> function initialize() { var mapOptions = {

Google Maps API - autosuggest on hover

人盡茶涼 提交于 2019-12-02 08:59:36
I want to make function in my web map that search input finds location, not on autosuggest click, but on autosgested place. Explain: -user points Us in input -autosuggest list places under it, like city1, city2, etc normal: users clicks place, map reload to this place, what i want: user hover mouse on place, map reloads to that place Is this possible ? I've attached on hover to elements but nothing more... $('body').on( 'hover', '.pac-container .pac-item', function(){ console.log($(this)); console.log($(this).data()); }); There is no mouseover-event for an Autocomplete. It should be possible

Adding multiple custom markers to a google map using an array

守給你的承諾、 提交于 2019-12-02 08:34:17
I'm currently working on implementing a google map for my website and stumbled across a great tutorial here which almost got me to the promised land. However, I have one more piece of functionality I'm looking to add. Inside my array I want display one of three different custom markers on my map. Does anyone have any ideas? Here's a fiddle ... var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.923036, 151.259052, 5], ['Cronulla Beach', -34.028249, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151

Google Maps API: reverse geocoding and address printing

强颜欢笑 提交于 2019-12-02 08:20:48
I created a map with a bunch of different locations, each with a type of marker and a title/description. What I'd like to do is extract from lat/lng the relative address. I found this function which should do what I'm looking for.. but I can't understand how to apply it to my existing code. Here's my fiddle . I'm looking for a way to output the address here: infoWindow.setContent('<h3>' + this.title + '</h3>' + data.description); Should be something like infoWindow.setContent('<h3>' + this.title + '</h3>' + data.description + results[0].formatted_address); updated fiddle Call the reverse

getting latitude longitude 0.0 from googleMap.getCameraPosition().target

你说的曾经没有我的故事 提交于 2019-12-02 08:00:44
问题 I was trying to get latitude and longitude of center of the map. I am using Fragment to show map that is, SupportMapFragment fm = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.mapID); if (fm != null) { googleMap = fm.getMap(); } LatLng loc = googleMap.getCameraPosition().target; I am printing this loc and i am getting value as 0.0, 0.0. I am not getting where i am going wrong. I tried to use VisibleRegion also to get latitude and longitude of center of map but even