does anyone know about a Google maps plug in for hippo? i want to add a map to a document so the document can be associated to a location
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Hi Juan,Tobias his solution is probably the easiest. I've also seen several Google Maps plugins while I was at customers. Not sure if any of the developers are reading this, but it would be great if you could share these with the community. I know there is one plugin on Github, which is a little outdated, but other then that I'm not aware of one you could use.Jeroen
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> // <![CDATA[ var GOOGLE_MAP_OPTIONS; function setupMaps() { GOOGLE_MAP_OPTIONS = { zoom: 20, center: new google.maps.LatLng(-33, 151), disableDefaultUI: true, mapTypeId: google.maps.MapTypeId.ROADMAP, navigationControl: true, scaleControl: true }; var maps = $(document).getElements('img[src^=http://maps.google.com/maps/api/staticmap]'); $each(maps, function(img, idx) { var mapCounter = 0; var idPrefix = "agm_"; var height = img.get('height'); var width = img.get('width'); var id = idPrefix + mapCounter++; var owner = img.getParent(); var div = new Element('div', {id:id, style:'background-image:url(' + img.get('src') + '); height:' + height + 'px; width:' + width + 'px;'}); div.wraps(img); owner.adopt(div); //img.wrap(div); var lat_lng = img.get('alt'); lat_lng = lat_lng.split(','); var lat = lat_lng[0]; var lng = lat_lng[1]; GOOGLE_MAP_OPTIONS.center = new google.maps.LatLng(lat, lng); var map = new google.maps.Map(document.getElementById(id), GOOGLE_MAP_OPTIONS); // add marker: var marker = new google.maps.Marker({ position: GOOGLE_MAP_OPTIONS.center, map: map }); }); } window.addEvent("domready", setupMaps); //]]> </script>