I have implemented part 1 and the google maps is working great.
However, when I include my maps api key
e.g. <script src="
http://maps.google.com/maps?
file=api&v=2&key=mykey&sensor=false" type="text/javascript" />
in one of the .html files, it causes liftweb to break with the
following output:
java.lang.RuntimeException: Expected
';'scala.xml.parsing.MarkupParserCommon
$class.takeUntilChar(MarkupParserCommon.scala:88)
scala.xml.parsing.MarkupParserCommon
$class.normalizeAttributeValue(MarkupParserCommon.scala:148) ...
I think that this is somehow related to point 2 from the previous
post. What do you think?
On Oct 22, 8:36 pm, Derek Chen-Becker <
dchenbec...@gmail.com> wrote:
> I agree that it's pretty broad, but a few things to note in general about
> Google (and a lot of other) JavaScript APIs:
>
> 1. Lift defaults to XHTML, which Google Maps won't work with. Override
> this via LiftRules.determineContentType (can specify HTML for a specific
> request path) or LiftRules.useXhtmlMimeType (global override)
> 2. If you're going to insert API urls, etc into templates from your Scala
> code, remember that you need to wrap them in scala.xml.Unparsed if they
> contain things like ampersands (&). Otherwise, Scala's XML lib will escape
> everything and you'll end up with URLs like "
>
http://foo.com?test=1&bar=2" instead of "
http://foo.com?test=1&bar=2"
>
> Derek
>
> On Fri, Oct 22, 2010 at 11:38 AM, Peter Robinett <
pe...@bubblefoundry.com>wrote:
>
>
>
>
>
>
>
> > Can you give us more information, Jack? That's a VERY broad question
> > and thus hard to answer. You could do several different ways, from
> > HTML to Javascript to either of those generated by Scala code.
>
> > Peter
>
> > On Oct 22, 6:08 am, jack <
j...@whirld.com> wrote:
> > > What is the best way to load a google map into a lift page?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to
lif...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
liftweb+u...@googlegroups.com<
liftweb%2Bunsu...@googlegroups.com >
> > .