AugustMiller / kirby-map-field

🗺 An easy way to use maps and location data in Kirby.
MIT License
41 stars 4 forks source link

Map doesn't load #17

Open chinochano opened 6 years ago

chinochano commented 6 years ago

Hello,

Thanks for such a great plugin. It's a feature I often need - I don't know why I didn't find it before.

However, I'm not able to make it work on my Kirby site. 😞 I've copied the files to plugins/map/ and added the key to config.php. The field shows up in the panel, but the map element (div.field-google-map-ui) remains empty. I have a map in my frontend (with even the same Google key) and that one works just fine.

Thanks in advance!

chinochano commented 6 years ago

Sorry, realized it was the same issue as here: https://github.com/AugustMiller/kirby-map-field/issues/13

ezekielaquino commented 6 years ago

Great plugin! thank you! but... Any idea how to solve this issue? works fine on localhost, but when deployed map is blank with the maps/key error

chinochano commented 6 years ago

I did manage to make it work. Now I can't remember how I did it though! :/

ezekielaquino commented 6 years ago

I managed to get it to work. My particular kirby installation was within a subfolder and the api call is not relative--- so a quick dirty fix i managed to do was to just add the subfolder name OR perhaps i make a pr that pulls the site base url into the plugin

janstieler commented 6 years ago

Hi @ezekielaquino how did you add the subfolder?

emilsomm commented 6 years ago

@ezekielaquino im also in need for this fix! would greatly appreciate your help here:)

Ventricule commented 4 years ago

I did this old dirty trick : Changing this line : https://github.com/AugustMiller/kirby-map-field/blob/master/fields/map/assets/js/map.js#L41 for this one : url: window.location.href.split("/panel")[0] + '/maps/key' I know... its dirty and kirby 2 is ooold. But that's working and I still have kirby 2's websites to maintain.