infowindow

Google Maps JS API (v3) InfoWindow Script Error - JSON Undefined

倾然丶 夕夏残阳落幕 提交于 2019-12-30 06:20:27
问题 I've been working on quite a nice program for a month or two now. I'm having an odd issue where clicking a marker on my map is giving a very vague script error. Literally just last night everything was working fine and all of a sudden this is happening. First, here's a brief look at my map. As soon as this form (VB) loads, a list of records is pulled from my SQL Server database. A marker with a unique ID is created for each record. An InfoWindow is made for each marker, and the InfoWindow is

Change the margin color of InfoWindow view of marker in google maps api v2

我怕爱的太早我们不能终老 提交于 2019-12-30 06:12:11
问题 Hello I try to change the default color that have (white) to black, this in the google maps api v2, anyone know how I can do this? PD: is the margin of infowindow this is my code where I change the content of infowindow but need change the margin :S GoogleMap map = .... map.setInfoWindowAdapter(new InfoWindowAdapter() { @Override public View getInfoContents(Marker marker) { View v = getLayoutInflater().inflate( R.layout.info_window_layout, null); v.setBackgroundColor(Color.BLACK); return v; }

infoWindow's image not showing on first click, but it works on second click

旧巷老猫 提交于 2019-12-29 09:29:13
问题 My android using the Google map android API,InfoWindow's image not showing on first click, but it works on second click I customize the infoWindow using void setMapInfoWindow(){ mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override public View getInfoWindow(Marker arg0) { return null; } @Override public View getInfoContents(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.windowlayout, null); final ImageView img = (ImageView)v.findViewById(R.id.imageView3); /

Android custom InfoWindow Google Map v2 onclick button?

爷,独闯天下 提交于 2019-12-29 08:44:09
问题 Hi i want to add marker info-window to my Google map in android application.So far i have add custom info window and it has Image and button.My target after click the marker then show the info-window and then after user click the button in window dismiss the info-window and do some activity after click the button.But i cant identify when user click button in marker info-window.This is my code. Plz tell me where is the wrong in my code. googleMap.setInfoWindowAdapter(new InfoWindowAdapter() {

Auto close InfoWindow in googlemap

一世执手 提交于 2019-12-29 08:25:25
问题 I do not know how to do in order to automatically close a InfoWindow when another opens. function bindInfoWindow(marker, map, title, race, loc, org, web, link) { var infoWindowVisible = (function () { var currentlyVisible = false; return function (visible) { if (visible !== undefined) { currentlyVisible = visible; } return currentlyVisible; }; }()); iw = new google.maps.InfoWindow(); google.maps.event.addListener(marker, 'click', function() { if (infoWindowVisible()) { iw.close();

Include open infowindows within bounds of map, when using fitbounds

╄→尐↘猪︶ㄣ 提交于 2019-12-28 23:26:22
问题 I have a map which contains multiple markers with infowindows. The infowindows need to be open on page load. The map is being centered using setbounds to incorporate all of the markers, which works, but it also needs to include the infowindows within the bounds. Currently the infowindows are cropped in places. JS: function initialize() { var map = new google.maps.Map(document.getElementById('map-canvas')); var bounds = new google.maps.LatLngBounds(); var myLatlng1 = new google.maps.LatLng(51

Trigger event with infoWindow or InfoBox on click Google Map API V3

佐手、 提交于 2019-12-28 02:05:23
问题 I want to know how to trigger an event when I click on an infoWindow using Google Maps API v3. In this example, when I click on a marker, an info window shows up with a unique message, based on which marker I clicked. I want to also be able to click the info window and have an alert show up that says "You clicked on the infowindow for ( __ fill in blank location _ ) I found some examples using Google Maps API v2 and jQuery, but not with just plain old Google Maps API v3. <!doctype html> <html

Google maps API infowindow showing only last statement from array

孤街醉人 提交于 2019-12-26 08:51:45
问题 I have this code. Adding Markers work great but right infowindow to markers don't.. (title in marker too) It's returning only last statements from array infoUser for all markers. I know.. I'm duplicating a question but I tried fix it with a lot of answered questions but it doesn't work. function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 3, center: {lat: 49.7437895, lng: 15.3360726} }); //array var infoUser = [ ['Germany','Maj','TUC','20','300'], ['Czech

Google maps: can you make string inside snippet bold?

落爺英雄遲暮 提交于 2019-12-25 09:03:49
问题 I have for a while been trying to make a custom info window that shows sensor data. My problem before was that I never solved how to make different info windows for different markers. All markers info windows were updated with the new data. So in order to get around this problem I was thinking about using the original info window. My code looks like MarkerOptions markerOptions = new MarkerOptions(); markerOptions.position(latLng); markerOptions.title("co: " +String.valueOf(co_mV) + " mV");

Store Locator in google maps, input zip code and display markers on map and sidebar

百般思念 提交于 2019-12-25 02:44:23
问题 I'm close to finishing this but I'm having a trouble with the Search box of gmaps. The concept of the project is to type in a zip code(in my example a fixed one, 15124) and display on the map a number of markers(representing the stores in that area) and in a sidebar their names. The only problem I am facing is the auto-complete/getPlaces property that the search-box has. How do I get rid of this property? I just want a plain input text so that i can write the z.c. and then take that and