infowindow

Google maps api v3: geocoding multiple addresses and infowindow

☆樱花仙子☆ 提交于 2021-02-07 04:40:45
问题 I am trying to get infowindow for multiple addresses. Its creating markers but when I click on markers, infowindow is not popping up. Please help and see what could be wrong in this code. Rest all info is fine only issue is with infowindow not coming up. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Maps Multiple Markers</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <

Google maps - multiple markers with unique infowindows

半腔热情 提交于 2021-01-28 08:02:54
问题 I am creating a map for users on my website. The way it works is I use PHP and AJAX to get all the sites users addresses, I then pass these values to my JS as JSON where I generate a google map centered around the current users address with a marker for each user on the map. This part works at the moment but what I'm struggling with is generating a unique infowindow for each user. As it is right now I get the same info window for all markers, how can I fix this? JS jQuery(document).ready

How to deselect a GMSMarker after removing custom infowindow in google maps swift

做~自己de王妃 提交于 2021-01-28 06:20:24
问题 So I have been using Google Maps iOS SDK 4.0.0 and my requirement is like this when I tap on a marker it should add UIViewContoller's view which I easily achieved. Take a look on the following code: var customeVC:CustomViewController? func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool { customeVC = CustomViewController(nibName: "CustomViewController", bundle: nil) customeVC?.delegate = self self.addChild(customeVC!) customeVC?.view.frame = self.view.frame self.view

Google maps API getting infowindow on click with geojson file

牧云@^-^@ 提交于 2020-12-15 05:32:46
问题 I am using the google maps API and I am displaying polygons on a map using a GeoJSON file. When the user presses inside the polygon, I would like an InfoWindow to appear and display data that is stored in the properties. Seems easy enough but when I am clicking on the polygons, nothing is popping up. Can anyone explain what I am doing wrong? Below is what I am currently attempting: map.data.loadGeoJson('plant_bounds_2011.json'); map.data.setStyle({ fillColor: 'red', strokeWeight: 1 }); var

Google Maps infowindow content disappears on reload. What could be causing this?

拜拜、爱过 提交于 2020-07-09 05:48:06
问题 I have Javascript that reads in data from a csv to display as infowindow content on Google Maps: // Create a map of maximum predicted value and time of that prediction function maxValuesMap(data,maxmap) { var dataStr = new String(data), stations = $.csv.toObjects(dataStr), iWindows = []; for (var i=0;i<stations.length;i++) { var st = stations[i]['Station'], ts = stations[i]['Time'], max = stations[i]['Max'], lat = stations[i]['Lat'], lon = stations[i]['Lon']; var windowLatLng = new google

Android Google Maps Move Camera

六眼飞鱼酱① 提交于 2020-06-13 19:07:32
问题 I've been implementing Google Maps with Android. I'm using frame layout to view the map, and it works. However, I wanna use the move camera in order to focus the map to a specific location. However, i can't implement it using my code. MainActivity.java public class MainActivity extends Activity { private MainMapFragement mapFragment; private HashMap<Marker, EventInfo> eventMarkerMap; EventInfo firstEventInfo; Marker firstMarker; @Override protected void onCreate(Bundle savedInstanceState) {

Android Google Maps Move Camera

独自空忆成欢 提交于 2020-06-13 19:06:06
问题 I've been implementing Google Maps with Android. I'm using frame layout to view the map, and it works. However, I wanna use the move camera in order to focus the map to a specific location. However, i can't implement it using my code. MainActivity.java public class MainActivity extends Activity { private MainMapFragement mapFragment; private HashMap<Marker, EventInfo> eventMarkerMap; EventInfo firstEventInfo; Marker firstMarker; @Override protected void onCreate(Bundle savedInstanceState) {

Add Android Fragment to InfoWindow Contents

血红的双手。 提交于 2020-05-02 05:08:47
问题 I'm writing an Android application that targets 4.0 and up and I'm using Google Maps v2. I'd like to set the contents of an InfoWindow with a Fragment . Does anyone know if it's possible? My class implements InfoWindowAdapter and here's the relevant code: // // InfoWindowAdapter interface // @Override public View getInfoContents (Marker marker) { LinearLayout layout = new LinearLayout(this.getActivity()); LayoutInflater inflater = (LayoutInflater) this.getActivity().getSystemService(Context

How to use a react component for showing Google Maps InfoWindow

烈酒焚心 提交于 2020-04-30 11:38:51
问题 i have my code as follows, i am not using any external libraries inside my react app import React, { Component } from "react"; import MarkerInfo from "./MarkerInfo"; import { render } from "react-dom"; class Map extends Component { componentDidMount() { this.renderMap(); } renderMarkerInfo = () => { return ( <div id="markerinfo"> <h1>THis is info marker</h1> </div> ); }; renderMap = () => { loadScript( "https://maps.googleapis.com/maps/api/js?key=KEY&callback=initMap" ); window.initMap = this

在谷歌地图上显示地名等信息,类似infowindow

纵饮孤独 提交于 2020-04-21 06:47:33
function Tooltip(options) { this.marker_ = options.marker; this.content_ = options.content; this.map_ = options.marker.get('map'); this.cssClass_ = options.cssClass || null; this.is_hidden = options.is_hidden === undefined ? !0 : options.is_hidden; this.div_ = null; this.setMap(this.map_); var me = this; if(this.is_hidden){ google.maps.event.addDomListener(me.marker_, 'mouseover', function(){ me.show(); }); google.maps.event.addDomListener(me.marker_, 'mouseout', function(){ me.hide(); }); } } Tooltip.prototype = new google.maps.OverlayView(); Tooltip.prototype.onAdd = function() { var div =