[Cubicweb] google maps

Adrien Di Mascio adrien.dimascio at logilab.fr
Fri Jul 31 08:56:15 CEST 2009


Hi Carlos,

On Thursday 30 July 2009 20:10:33 Carlos Balderas wrote:
> I am trying to implement a google maps view in my cube, but I get the
> following error when I try to use my view hotelmap :
>
> XML Parsing Error: not well-formed

You can't server application/xml+xhtml if you want to use google maps. It's a 
known problem. You'll have to serve text/html instead. 

With CubicWeb 3.3, you'll have to monkeypatch the xhtml_browser() method,
for instance in your cube's views/__init__.py file :

  from cubicweb.web.request import CubicWebRequestBase
  CubicWebRequestBase.xhtml_browser = lambda x: False

In CubicWeb 3.4 (to come in the next fews days), there will be a configuration 
option named "force-html-content-type" dedicated to this.

Anyway, in the particular case of google-maps view, I guess, the content-type 
should be set automatically. I've filed a ticket in the tracker :

  http://www.cubicweb.org/ticket/344872

Cheers,

-- 
Adrien Di Mascio                              LOGILAB, Paris (France).
Formations Python,Zope,Debian,Calcul    http://www.logilab.fr/formations
Développement logiciel sur mesure:      http://www.logilab.fr/services
Informatique scientifique:              http://www.logilab.fr/science
Gestion de connaissances:               http://www.cubicweb.org/
Python in Python:     http://codespeak.net/pypy/dist/pypy/doc/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20090731/457ed36c/attachment-0272.sig>


More information about the Cubicweb mailing list