I am using Umbraco 4.7.1 and just downloaded and installed the Google Maps Data Type package. I added the Google Map Data type to my Store "Document Type" when I go to the Store Content Page the Map is displayed, I put the address and search. It finds the right the right Map, but does not display any longtitude or latitude under the address (I've seen a screen shot with this information displayed) and when I say the Content Document it doesn't save the address.
<script type="text/javascript"> <xsl:text disable-output-escaping="yes"><![CDATA[ var headOfficeMarker = new google.maps.MarkerImage("/images/markerHeadOffice.png", new google.maps.Size(50, 39), new google.maps.Point(0, 0), new google.maps.Point(25,0)); var cncMarker = new google.maps.MarkerImage("/images/markerCNC.png", new google.maps.Size(46, 35), new google.maps.Point(0, 0), new google.maps.Point(23, 35)); var markers = []]></xsl:text> <xsl:for-each select="$locationsLandingPage/LocationCashnCarry"> <xsl:variable name="coords" select="umbraco.library:Split(./googleMap,',')"/> <xsl:value-of select="concat('{ lat :',$coords/value[1],',lng:',$coords/value[2],',name: "',./@nodeName,' Cash ',$apos,'n Carry",markerImage:cncMarker,URL:"',umbraco.library:NiceUrl(./@id),'"}')"/> <xsl:text>, </xsl:text> </xsl:for-each>
Problem with Google Map Data Type
I am using Umbraco 4.7.1 and just downloaded and installed the Google Maps Data Type package. I added the Google Map Data type to my Store "Document Type" when I go to the Store Content Page the Map is displayed, I put the address and search. It finds the right the right Map, but does not display any longtitude or latitude under the address (I've seen a screen shot with this information displayed) and when I say the Content Document it doesn't save the address.
Hi Lou
Left click on the marker on the map - a dialogue appears with a link like "Use this location". This is how you save the co-ordinates and zoom.
Cheers
Nigel
Hi Nigel
Thanks for that, it works.
I still cannot get Locator Razor to work ith it. What are you using to display Stores/Locations (multiple points) on a Google Map.
Lou
Hey Lou
I have just last week coded some xslt to plot multiple points on one Google Map using XSLT - I haven't braved learning razor yet...
Here's some code that hopefully makes some sense....
XSLT Code
Javascript Function
I hope this helps - feel free to drop me a line at [email protected] if you need clarification on any of my shonky code :-)
Cheers
Nigel
Hi Nigel, can you please show how to call this displaymap js function within some template and give it parameters from content.
The
- parameters gain values from the properties of content data.
Thanks
Alexander
is working on a reply...