Hello Axel,
Thanks for your reply.
Please consider our apologies for any inconvenience caused. We had to ask you to replicate the issue, or just share with us the exact and specific step-by-step in order to reproduce it, because this way we could have a clue why you're getting this error:
2.
hidden link
This is an alternate version of the same map page. Right now it shows an error very similar to what I experienced several times with this map module. This was the reason I opend this ticket.
- What's happening here? Why the error?
- Here I tried to zoom into a specific longitude/altitude. This worked at first try, but every time I edited the page again, both settings were back to zero, somewhere in africa. How can this be prevented?
By knowing a bit more the steps you're following, we could better understand and troubleshoot the error. Regardless, about this corrupted block issue, may I kindly ask you to just remove the block and recreate another one?
Now, about the first question you brought:
1.
hidden link
Here I want the map to show a standard search result whenever it is opened first, including it being zoomed in to the result. The search should be for "Deutschland" in the field "Land". I need to know how to do this myself, since I will have several other projects to do where I need this functionality.
We had to elaborate and create a custom code solution for this. Unfortunately, Toolset does not have a built-in feature that allows you to select a default location in the custom search filter, and therefore display it in the Maps block. So, there is not another option, code customization is necessary here.
We went to the 'Custom JS' section of your Views: hidden link, and just added this JavaScript code: https://pastebin.com/NBWdur4B. It seems to be displaying some specific locations in Germany now, could you please review it?
Feel free to alter the zoom, latitude and longitude by replacing the actual values with the desired ones in this part of the JS code:
mylat = 52.516417;
mylong = 13.402762;
map.setCenter(new google.maps.LatLng(mylat,mylong));
map.setZoom(10);
Note: the possible solution provided is to be used just as an informational one. Please remember that custom coding is out of the scope of our support, so we can't create, debug or modify code for you and it's your responsibility to maintain it. We hope the one we used as an example could point you in the right direction. Please check our support policy: https://toolset.com/toolset-support-policy/
Again, sorry for the trouble caused. We kindly ask you to reconsider keep using our products and services.
Thanks for your understanding. If you need anything else don't hesitate to contact us.
Best regards,
Mateus.