infowindow

gmaps4rails repeating partials for markers

拟墨画扇 提交于 2019-12-11 17:54:10
问题 I am having difficulty with gmaps4rails infowindow. I have an app which successfully displays multiple markers using json data stored in activerecord. I created a partial to select additional info to display in the infowindow, but the same data from the first instance of PoliceAlert class is being repeated in each marker: Controller: class StaticPagesController < ApplicationController def main @police_alerts = PoliceAlert.all @police_hash = Gmaps4rails.build_markers(@police_alerts) do |police

Use Custom INFOWINDOW with MySQL

纵饮孤独 提交于 2019-12-11 15:55:28
问题 I have a map where i display markers that are stored in a db (MySQL),each marker have different fields with it (for example: name, email, addres, etc), since "MarkerOptions" only let me use ".tittle",".snippet"some of the fields that i want to attach are left out, i know now that i have to use a custom infowindow to show all the fields that i want to. How can i do this? My code: Main: ArrayList<HashMap<String, String>> location = null; String url = "http://appserver.eco.mx/movil/getLanLong

Google Maps- Multiple InfoWindows

怎甘沉沦 提交于 2019-12-11 14:15:52
问题 I have a javascript code as below var markers = response.d.split('^^'); var latlng = new google.maps.LatLng(51.474634, -0.195791); var mapOptions1 = { zoom: 14, center: latlng } var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions1); for (i = 0; i < markers.length; i++) { var data = markers[i]; var lat = data.split('__')[0]; var lng = data.split('__')[1]; var addr = data.split('__')[2]; var distance = data.split('__')[3]; var newltlng = new google.maps.LatLng(lat,

GMaps APIv3 InfoWindow for markers in loop for() is always the same

不羁的心 提交于 2019-12-11 13:23:26
问题 I know the topic has already been discussed many times, but I can't resolve my problem. I'd like to display some markers on my map, with a click event on each of them. Each click event should open an infoWindow with some data. Here is what I wrote ; this code runs without any error in the console, all the markers are correctly displayed, but the infowindow displayed on click is always the same for all... //Global variable var info = new google.maps.InfoWindow(); //... some other functions

Gmaps4rails - How to call infowindow marker outside from maps

℡╲_俬逩灬. 提交于 2019-12-11 06:07:14
问题 I have used gmaps4rails before with success but this time i have a need that i cant figure out how to do it. I have my builder working and generating my map_info partials, also, i am able to open every infowindow from markers by clicking inside the map. What i need is to call the infowindow of a marker from a list. (onclick event inside a div for instance) builder inside controller @gmaps_markers = Gmaps4rails.build_markers(@partners) do |partner, marker| marker.lat partner.latitude marker

google maps api v3 infowindow + flot

≯℡__Kan透↙ 提交于 2019-12-11 05:29:12
问题 I'm trying to draw a graph inside an infowindow , but flot is not executing—and is not throwing any errors. I read in the flot forum that often people have trouble with doing something like this because the placeholder element must be visible (that might be a red-herring here tho). I'm able to get the following to produce the graph appropriately in a different element: $.plot( $("#placeholder"), [ f_data[loc] ], { grid: { hoverable: true, clickable: true }, series: { bars: { show: true },

Keeping the InfoWindow in view when zooming map in

一个人想着一个人 提交于 2019-12-11 04:48:36
问题 Just started converting our maps from V2 of the API to v3. Got one issue so far in that when an InfoWindow is open, and the map is zoomed in, the InfoWindow will move off the map and eventually not be visible, this is different behaviour than in V2. In V2 the InfoWindow remains in view all the time. V2 map: http://www.stroud.gov.uk/docs/housing/tenant_map_v2.asp V3 map: http://www.stroud.gov.uk/docs/housing/tenant_map_v3.asp Simply click on any marker to open it's InfoWindow, then zoom the

Google Maps Infowindow Auto Updating

[亡魂溺海] 提交于 2019-12-11 04:24:13
问题 I have an app in which I need the data in the infowindow bubbles to update automatically. I've checked around and I see methods for moving markers, updating marker colors, and the like, but nothing with directly updating infowindow content. I am pulling the value necessary (e.g. building[i][7] ) from a hidden DOM element whose content automatically updates, and I need the infowindow's content to automatically update alongside it. Here is the code I am using to draw the infowindow bubbles.

Facebook Comments Stream in Google Maps Infowindow

隐身守侯 提交于 2019-12-11 03:29:35
问题 I’m currently working on a Google Maps project showing places of interest in my local town. My plan was to use multiple markers on the map to identify different places which when clicked on would open an InfoWindow listing more details about the place.... I also thought it would be good to allow visitors to leave comments and experiences using the Facebook Comments Plugin within the InfoWindow. However, on further research and reading a couple of other peoples efforts into trying to get

Loading Fusion Tables InfoWindow data in a div outside map

旧时模样 提交于 2019-12-11 03:27:20
问题 I hope someone can help with what is probably a fairly simple query. I have seen a question on here about trying to do this without a mouseclick, but I want to add an event listener to the markers on the Fusion Table map that will load the infoWindow content in a separate div below the map. So far I have suppressed the infoWindow, but I'm a bit lost on the next step of adding the click, retrieving the data relevant to that marker and loading into the div. The marker display is limited to