egeloen / IvoryGoogleMapBundle

Google Map API v3 integration for your Symfony2 project.
https://github.com/egeloen/ivory-google-map
MIT License
217 stars 152 forks source link

Custom javascript after loading maps api async and right before Ivory generated js code #82

Closed fnash closed 11 years ago

fnash commented 11 years ago

Hello,

I am loading my map asynchronously and I need to include an utility library (https://code.google.com/p/google-maps-utility-library-v3/). So the utility js code must run right after gmaps has been loaded and just before the generated code of Ivory. Is there a way to properly integrate any js code in the beginning of function load_ivory_google_map(); without hacking MapHelper::renderJavascripts(Map $map) ?

I think developers need a way to add custom code in this place so they can test versions and have better control of the generated js code!

It is also valid for example for the MarkerClusterer utility library which always take code from the trunk!

What do you think?

Thanks

egeloen commented 11 years ago

For now, there is no extension point in the code which can allow you to easily do it... So, without creating your own helper & redefine the renderJavascripts method, there is no way... :s

I'm :+1: for allowing devs to define there own js in the middle but how would you like it?

fnash commented 11 years ago

The standard way of overriding is already nice fortunately!

I will think about it!

Thanks

egeloen commented 11 years ago

@fnash Does the issue can be closed?

fnash commented 11 years ago

Yes!

If I have one day a better idea, I will let you know. Thanks