I have a recordset of locations which I am putting onto a map. (The offset center is required to accomodate the design.) I would like a sidebar with the same recordset and when you click a link for the map to center on the relevant marker (perhaps even for it to open, but that can wait).
I've tried various suggested solutions but none work for me. Any suggestions would be greatfully received. You can see the map here http://bbn.thezenagency.co.uk/members if (GBrowserIsCompatible()) { function createMarker(point,html) { var marker = new GMarker(point, icon); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } GMap2.prototype.setShiftedCenter = function (NW, z, sh) { var proj = this.getCurrentMapType().getProjection(); var px = proj.fromLatLngToPixel(NW, z); var sePx = new GPoint(px.x + sh.width, px.y + sh.height); var seLatLng = proj.fromPixelToLatLng(sePx, z); this.setCenter(seLatLng, z); } var map = new GMap2(document.getElementById("map")); var mapTypeControl = new GSmallMapControl; var bottomRight = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(5, 5)); map.addControl(mapTypeControl, bottomRight); map.setCenter(new GLatLng(0,0),0); var bounds = new GLatLngBounds(); var icon = new GIcon(); icon.image = "/images/bbn/icons/marker.png"; icon.shadow = "/images/bbn/icons/shadow.png"; icon.iconSize = new GSize(16, 30); icon.shadowSize = new GSize(36, 32); icon.iconAnchor = new GPoint(25, 35); icon.infoWindowAnchor = new GPoint(5, 1); <%=markers%> var tiltSwitch = bounds.getCenter(); var shift = new GSize(-200, 0) var zoom = map.getBoundsZoomLevel(bounds); var zoom = zoom-1; map.setShiftedCenter(tiltSwitch, zoom, shift); //map.setCenter(bounds.getCenter()); map.setZoom(map.getBoundsZoomLevel(bounds)-1); } -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
