google-maps-markers

Add an image for Android marker info window

China☆狼群 提交于 2019-11-30 19:09:01
问题 I'm making an android app. In this app, there are markers of some hotels and when user click on the marker info window appears and it should be like following image. (This is a web application) I have a list view in my navigation drawer fragment and map fragment has the markers. This is my code before I try to load image for the info window in MainActivity.java . // Load Hotels private class GetHotelTask extends AsyncTask<String, String, String> { @Override protected String doInBackground

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

倖福魔咒の 提交于 2019-11-30 18:59:00
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; } }); thanks for reply Use getInfoWindow instead of getInfoContents to provide full info window. Make

Which map solution / package to use with Flutter Web?

霸气de小男生 提交于 2019-11-30 18:49:53
问题 I am porting over a flutter mobile project to flutter web and was curious which map package to use in place of: https://pub.dev/packages/google_maps_flutter 回答1: I was able to get a workable solution, but it isn't pretty. Below is the implementation. If I get some time and a legit port doesn't come a long I will post an example repo. import 'dart:html'; import 'package:flutter_web/material.dart'; import 'package:lift_ai/base/screen_state.dart'; import 'package:lift_ai/feature/property_common

Marker changes its position while zoom in or out in google map v2 in android

痞子三分冷 提交于 2019-11-30 18:46:57
问题 I am using Google map V2 to put several markers on map. i am using default marker with different color, my problem is that when i perform zoom in or out operation marker changes its position. I have searched a lot but didn't get any solution. to add marker i am using following code myMap.addMarker(new MarkerOptions().position(new LatLng(serverResponse.get(i).getLat(), serverResponse.get(i).getLon())).title(data).snippet(data2)); 回答1: You have forgotten to call to the method .anchor(float a,

Open only one infowindow at a time google maps

吃可爱长大的小学妹 提交于 2019-11-30 18:10:54
问题 Im trying to create a google map with multiple markers that allows only one info window at a time. The markers are the locations of IP cameras and they are fetched through ruby. I've read loads of answers to similar questions whereby the solution is to create only one info window and re-use it. I have tried to implement the solutions from a number of other questions but I can't get it to work. $(document).ready(function () { // execute (function () { // map options var options = { zoom: 2,

Toggle hide/show Google map markers

假装没事ソ 提交于 2019-11-30 16:15:22
I have a custom Google map with markers of artist locations. I want to make 8 different categories of markers. I read about having to make arrays of markers and assigning a category, but I honestly don't know where to start.. I think this question comes close to what I want: Toggle on/off Google map markers by category . Tried to get that working, but to no avail, I just have too little knowledge. Here's my HTML. I have a map and a few checkboxes ready, the checkboxes aren't used yet. <body onload="initialize()"> <div id="map_container"> <div id="map_canvas" style="width:700px; height:350px">

How to geocode an address into lat/long with Google maps

放肆的年华 提交于 2019-11-30 16:05:20
I want to be able to plot several companies on a google map and understand I need to geocode these. I also have the code below that plot's multiple markers on a map. How can I Geocode several company addresses (using the following address as the first example) and incorporate it into the current code I have? I really need someone's help as I can't make sense of the Google documentation as well as incorporating it with what I already have. you could use google's geocoding to obtain coordinates of your post codes EDIT: I don't really like you changing the sense of the question like that but ok.

Attach event handler to element inside google maps info bubble

南楼画角 提交于 2019-11-30 15:57:12
问题 I have a question regarding google maps and event handling/listening. Using jQuery and google maps v3, I am able to place a map marker and an event listener that opens an infobubble when the user clicks on the marker. What I'd like to do (but so far haven't been able to figure out) is add another event handler to the contents of the info bubble. For example, if the user clicks on the map marker open the info bubble (that part works), and then if they click on something inside the infobubble

Google Maps v3: need multiple draggable markers to update HTML input fields

烂漫一生 提交于 2019-11-30 14:57:46
I'm working on a project using Google Maps v3 that will allow users to drag and drop randomly placed markers (quantity, coordinates, and labels generated with php). I would like the latitude and longitude of moved markers to update html input fields on the page. Unfortunately, I do not know enough about js to give each marker a unique identity in an efficient way by using arrays and/or 'variable variables'. Here is my code thus far: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height:

Attach event handler to element inside google maps info bubble

心不动则不痛 提交于 2019-11-30 14:51:56
I have a question regarding google maps and event handling/listening. Using jQuery and google maps v3, I am able to place a map marker and an event listener that opens an infobubble when the user clicks on the marker. What I'd like to do (but so far haven't been able to figure out) is add another event handler to the contents of the info bubble. For example, if the user clicks on the map marker open the info bubble (that part works), and then if they click on something inside the infobubble do something else. I have pasted my code below, thanks in advance for any help function addMarker(data)