okay, after some hours of fiddling, i will just write what i tried and wait for some kind of response
so basically what i tried to do, is to have the gmaps-snippet call in an external resource and load it dynamically via jquery ajax-call.
i did so, because i wanted to transmit the ids as a get-variable to the AJAX-resource. that would look a little like this.
var uri = "[[~941? &ids=`936` &scheme=`full`]]";
$(".retailer #refresh_map").click(function(e){
e.preventDefault();
$(".retailer #maps_placeholder").empty().load(uri, function(){
initialize();
});
});
but, as you can imagine, this code is not working, as your snippet constructs the javascript it needs for initializing in the header tag of the page, alongside with the linking of google-js files.
so i can draw in the html of the remote-resource, but when i call initialize(), it initalizes the map with the values of the "local" resource.
i also tried ways to draw in the JS from the remote-resources’ header, but failed and things got messy, so i thought i’ll let it rest for a bit.
--
in the end, i envision the use-case, that i can call the remote-URL and pass a long the IDs via GET and receive an updated map.
Do you think this is possible with the current implementation already?
Or would you need to tweak it hard, to accomplish that use case?
Some thoughts of yours are much appreciated, thanks!
niklas