google-maps-markers

Adding multiple addListener events to a Google Map form with geocoding

为君一笑 提交于 2019-12-09 19:22:26
问题 I have created a Google Map form that lets users enter an address into a text field and geocode the entry. This then puts a marker on a map. This works fine, but I want to add an additional addListener so when the user clicks the map it will add another pin where they click. For some reason my 'click' addListener is not working. How would I have multiple add Listeners like that? I attached my current code: function initialize() { var mapOptions = { center: new google.maps.LatLng(40.7,-74.0),

Same parameters for Apple Maps and Google Maps API?

左心房为你撑大大i 提交于 2019-12-09 16:11:50
问题 On iOS 6 devices like the iPhone and iPad, as well as the latest Mac's, a link to maps.apple.com/maps?q=cupertino is opened in Apple's native mapping application. On non-Mac computers and other devices, it leads to maps.google.com/maps?q=cupertino instead. This is a welcome functionality for developers, however, is Apple's API supported by Google Maps? In other words, do all of the following Apple Maps parameters translate perfectly to something in Google Maps on the web? q= The query

Drag & drop an object into Google Maps from outside the map : marker not put at correct latitude / longitude

爷,独闯天下 提交于 2019-12-09 12:15:06
问题 I'd like to drag an object into my Google Map (API V3) from outside the map. After some research, I found this very helpful post and I tried to adapt it to my project. The main idea is to drag a .png image on the map and when the mouse button is down, get the actual coordinates and place a marker at that lat / lng. But I noticed there is a difference between the point you drag your image and the point where your marker is placed. The difference is around 10 / 15 pixels on the sample linked

GMSMarker opacity animation not repeating

回眸只為那壹抹淺笑 提交于 2019-12-09 12:06:43
问题 I'm trying to make a GMSMarker with a custom icon blink with a decaying animated opacity. The animation should repeat itself for a few times, but it does not, it just performs one transition and then it stops. This only happens when animating the opacity property, it works fine when animating other properties. Here is the code: GMSMarkerLayer* layer = marker.layer; CABasicAnimation *blink = [CABasicAnimation animationWithKeyPath:@"opacity"]; blink.fromValue = [NSNumber numberWithFloat:0.0];

Create markers from JSON array php mySQL Google Maps v2 android

隐身守侯 提交于 2019-12-09 06:52:45
问题 I'm trying to create markers on Google Maps v2 from my mySQL database and it is not working. The map does come up but there are no markers. Can any one tell me what is wrong and what I need to change? I've also tried having the getDouble be getDouble(0) and getDouble(1) but I read somewhere to try 0 and 2. It also has a bunch of imports from multiple tutorials I've tried. I'll remove later. My Activity import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common

Google Maps geocoding and markers in loop

人盡茶涼 提交于 2019-12-09 04:27:48
问题 I'm completely puzzled here. I have a list of objects each containing a location. I look up this location using the google.maps.geocoder and afterwards I put a marker for that location on a map. But for some reason only one marker appears. I guess this has to do with the closures problem I've seen in other threads around here but I just can't seem to apply the solution to what I have. My code is as follows: var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); map

Google Maps InfoWindow on Clusters

一笑奈何 提交于 2019-12-09 04:24:56
问题 I have a map with lots of markers. All these markers have a InfoWindow. With the Markers Cluster Lib, (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js) I get clusters that zoom in when clicked. Some Markers have the exact same coordinates, so they turn into a cluster even when I reach the maximum zoom. This is all fine so far, except that I want to also open a InfoWindow when clicking in the cluster that never splits into markers when

How do I add markers to streets only - Android Development

耗尽温柔 提交于 2019-12-09 03:37:11
问题 After plenty of searching, I haven't yet found a solution that works for me and I'm really hoping someone here could help me. First I'll explain my problem, and then I'll mention some of the approaches I've attempted/considered so far. Basically, I'm developing an Android app where markers randomly appear around the user's location. The catch is, the markers need to be placed on streets only. I've been working with Google Maps Android API V2 but I'm trying to work around using anything with

Google Maps HeatmapLayer clickable endpoints

徘徊边缘 提交于 2019-12-09 03:36:23
问题 When a user reaches a zoom level where the cluster only consist of 1-4 LatLng points I would like to make the object clickable to show source of the data used for the heatmap. Any tips on how to address this issue? Can I connect any type of EventListener to the HeatmapLayer points? 回答1: There is no click-event for a heatmap( basically there isn't any event a heatmap will listen to). What you can do: use a markerClusterer. Create Markers for all points, as markerImage assign a a transparent

Google Map multiple infowindow does not work

扶醉桌前 提交于 2019-12-09 02:02:25
问题 I tried to add multiple markers and infowindow to a google map using javascript. Below is the code: <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Maps Multiple Markers</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> </head> <body> <div id="map" style="width: 500px; height: 400px;"><