[pmwiki-users] Problem with Google Map API and locale de_DE

Ben Wilson dausha at gmail.com
Wed Jun 7 10:43:44 CDT 2006


On 6/7/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Jun 06, 2006 at 09:23:02PM +0200, Christian Bartolomaeus wrote:
> > Hi,
> >
> > I just encountered the following problem with the new
> > Google Map API [1]: When using the Google Map API on a wiki which
> > sets
> >
> >   'Locale' => 'de_DE'
> >
> > via XLPage, the GMap-API seems to get confused. I guess it has
> > something to do with using the dot '.' instead of the comma ',' when
> > giving fractional numbers as values for latitude ('lat') and longitude
> > ('lon'). When I try to produce a map with
> >
> >   (: gmap lat=54 lon=13 :)
> >
> > everything is okay. But as soon as I use
> >
> >   (: gmap lat=54.09285 lon=13.3785 :)
> >
> > at least the value of the longitude seems to be ignored or
> > misinterpreted.
> >
> > Is there something I can do about that?
>
> The locale setting is causing periods to change to commas.
> After the call to XLPage(), try restoring the locale back to
> the standard dot:
>
>     XLPage('de', 'PmWikiDe.XLPage');
>     setlocale(LC_NUMERIC, 'C');

Hmm. The only "fancy" thing I am doing with lat/lon is calculating the
center point and outer bounds.[1] If you still have the problem after
PM's fix, please "view source," and send me the Javascript that
appears at the end of the page. It should be about a half-page block.

[1]: For a future "fix the zoom" feature.

-- 
Ben Wilson
"Mundus vult decipi, ergo decipiatur"




More information about the pmwiki-users mailing list