infowindow

Zoom function Google maps

你离开我真会死。 提交于 2019-12-13 06:17:21
问题 I've created a button inside my info window that needs to pan to the marker and then zoom in but I can't get it to work. Below is my Zoom function function Zoom(){ google.maps.event.addListener(marker, 'click', function() { map.panTo(marker.position); map.setZoom(18); }); and this the function that creates the marker and fills the info window with the html below. function createMarker(latlng, name, woonplaats, prijs, perceelop, woonop, address) { var html ="<a href="+address+">"+"<b>"+name+"<

Prevent Google maps infowindow from closing

心不动则不痛 提交于 2019-12-13 05:26:05
问题 If certain conditions are met when an infoWindow is closed, I want to prevent the default close event that is fired. Is it possible to achieve that? I tried a number of things like: Stopping event propagation returning false from the callback method there aren't any methods/properties exposed by the infoWindow either that prevent close. Please let me know if this is possible. 回答1: The InfoWindow doesn't really provide a way to step event propagation. I don't know if it could work for you, but

Issue with infoWindows with multiple markers and directionsDisplay variables in Google Maps API v3

落爺英雄遲暮 提交于 2019-12-13 04:36:32
问题 I'm trying to display how distance and how minutes are between two markers in Google Maps API v3 and use these information to override the default infoWindow text that appears when the directionsService is fired, I think there is a asyncronous problem with calcRoute() and the infoWindows . This is an example code that reproduces the error. <html> <head> <meta charset='utf-8'> <script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script> <script> var

Google maps offline map api-3 infowindow

五迷三道 提交于 2019-12-13 02:57:08
问题 I'm trying to develop offline Google map with some markers. I have done it well. I'm using Offline Google maps api-3. Here my problem is showing infowindow() . When is use online map my infowindow() shown like this , but when I use offline map the infowindow() showing like this . in Online map, the marker indication corner is small, but in offline map it's bit larger than online map infowindow(). I want to use infowindow() similar like online map infowindow(). I would like to reduce the

Info Window wrong size on Google Maps API v3 Street View Service

一曲冷凌霜 提交于 2019-12-13 02:26:11
问题 The Setup: On the same page (inside the same map canvas), I have 2 info windows. The CSS for both of them is the same. The content is very similar. Initially, the Street View pano loads with an info window open. A button inside the info window is used to toggle between the regular map and Street View. The map has a second info window displayed with a button to go back to Street View. The Problem: One info window is resizing to fit the content and the other one is not, so it's displaying

Show dynamically to InfoWindow Googlemap V2

泪湿孤枕 提交于 2019-12-13 00:28:14
问题 I'm developing a travel app. On Google map API V2 feature, I want each InfoWindow have an different image. I've override WindowInfoAdapter for custom title and detail text. public class MyInfoWindowAdapter implements InfoWindowAdapter { private final View mView; public MyInfoWindowAdapter(Activity activity) { mView = activity.getLayoutInflater().inflate(R.layout.custom_info_window, null); } @Override public View getInfoContents(Marker marker){ String title = marker.getTitle(); final String

Gmaps.js - multiple markers with dynamic infoWindow content

放肆的年华 提交于 2019-12-12 09:11:05
问题 I've been reading extensively on the topic of adding dynamically generated infoWindow content to Google Maps API v3 maps, but I'm having trouble finding answers that work for my implementation of the map (I'm using an existing script called gmaps.js). I have limited experience with javascript and PHP, so I'm hoping someone can point me in the right direction. Currently, I have my markers set up on a map I'm using for a Wordpress site. The markers are properly placed in accordance with the

Create a custom info window in google maps V2

寵の児 提交于 2019-12-12 07:44:32
问题 I'm trying to make a custom window that look like that (for map objects). But instead of the project following and follower I wanna place an image, but I can't figure out how to make one, any refferes? thanks in advance. 回答1: its just an xml layout like other layouts would be. check here for a small tutorial. Just remember that buttons in the layout will not work 回答2: Read this post to understand how to create custom infowindows. You can add the required imageviews inside the xml layout file

Customizing an InfoWindow

怎甘沉沦 提交于 2019-12-12 07:02:46
问题 Is it possible to change the color of the border, the alignment, padding and other attributes of an InfoWindow? I've been looking for this for a week but I always end up here. And it does not provide a code. Here's my code. //Declare an infoWindow variable - shows when a marker is tapped/clicked var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP file downloadUrl("outputXML.php", function(data) { var xml = data.responseXML; var markers = xml

How to position Google Maps Infowindow box near the top and style as error

允我心安 提交于 2019-12-12 06:50:09
问题 I have developed this plunker sample: Click on "View Canada Map with Message" to see the infowindow. I want the infowindow to be positioned near the top of the map boundary or in the middle of the upper part. Also, I want to style the infowindow to appear as error message with error indicator icon. See sample code below: <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0"> <meta charset="utf-8"> <style> /* Always set the map height