Can't seem to get Locator Package to display results
Would anyone be able to assist? Here's step-by-step
Installed Locator package.
Generated new Google Maps API key and added info to Locator data type
Created a results.aspx page with locator data type and "results" template with the follow macro call <umbraco:Macro XPath="$currentPage" LocationAlias="results" UseAddress="0" AddressAliases="" ResultsXslt="LocatorResults.xslt" AddressExtra="" UnitInKm="0" MultipleResultsCaption="" Alias="Locator" runat="server"></umbraco:Macro>
Set up my form element on another page with the "get" and "action" properties to point to the results.aspx
Added the Google Maps API generated script tags to my master page.
Googled the address in my results content page
Went to my form, typed in zip code, was redirected to results.aspx, but informed "No results found".
When visualizing the XSLT of the results.aspx page, the output is the correct coordinates of the location.
Any ideas? What am I missing? Probably something wrong with my XPath path from the umbraco:Macro? I appreciate any help or suggestions in advance.
If
I evaluate the <xsl:when> to "!= 0", the Google map is drawn, but
with the pin at the address from the previous page, which is leading me
to think there's something wrong with my xml. I can't find a "distance"
attribute in my umbraco.config, but it should be there right?
Can't seem to get Locator Package to display results
Would anyone be able to assist? Here's step-by-step
<umbraco:Macro XPath="$currentPage" LocationAlias="results" UseAddress="0" AddressAliases="" ResultsXslt="LocatorResults.xslt" AddressExtra="" UnitInKm="0" MultipleResultsCaption="" Alias="Locator" runat="server"></umbraco:Macro>
Any ideas? What am I missing? Probably something wrong with my XPath path from the umbraco:Macro? I appreciate any help or suggestions in advance.
The out is only the longitude and latitude... you need to setup a google script in the page and pass in the values to a GLatLang object.
Isn't the Google script handled in the xslt?
<xsl:when test="count(/root//node [string-length(./data [@alias = 'distance']) > 0 and number(./data [@alias = 'distance']) < $radius]) = 0">
<p>No Results found</p>
</xsl:when>
<xsl:otherwise>
<script src="http://maps.google.com/maps?file=api&v=2&key={Locator:GetGoogleMapsKey()}"
type="text/javascript"></script>
...
If I evaluate the <xsl:when> to "!= 0", the Google map is drawn, but with the pin at the address from the previous page, which is leading me to think there's something wrong with my xml. I can't find a "distance" attribute in my umbraco.config, but it should be there right?
Okay, figured it out, needed to go to the codeplex page and download the xslt for the new schema.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.