delahaye / dlh_googlemaps

Google Maps Extension für Contao
20 stars 26 forks source link

groundOverlay pair of coords #90

Closed renaudkaczmarek closed 6 years ago

renaudkaczmarek commented 6 years ago

Hi,

Your extension is blowing my mind ! Really good !

but I tried to add a groundOverlay, so I added this pair of coords :

47.642496 -2.820437, 47.702834 -2.687228

But the result is that It adds the coord without "," in the LatLng function

new google.maps.LatLngBounds(
        new google.maps.LatLng(47.642496 -2.820437),
        new google.maps.LatLng(47.702834 -2.687228)
    )

So I add this in the template :

new google.maps.LatLng(<?php echo str_replace(" ", ",", $this->element['bounds'][0]); ?>),
        new google.maps.LatLng(<?php echo str_replace(" ", ",", $this->element['bounds'][1]); ?>)

I didn't find another way to make this work.

Can you tell me if it's a bug or if I'm not doing right with this ?

Thank you for your answer. ;)

renaudkaczmarek commented 6 years ago

Same for rectangle ! :)

delahaye commented 6 years ago

That was a bug. In the coming release it is like named in the field name: 47.642496 -2.820437/47.702834 -2.687228. Thanks!