[OutSystems Maps] Load additional libraries
Forge component by OutSystems R&D
Application Type
Reactive

Hello, 


I am trying to use the Google Places API autocomplete on the same page in conjunction with the OutSystems Maps application.

But depending on the loading order, I will get a map with no markers and autofill working, or a correct map displayed with markers and no autocomplete.

I thought this could be because the same script is being loaded twice.


Updating the code for the OutSystems Maps App seems to work:

script.src = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey;

to

script.src = 'https://maps.googleapis.com/maps/api/js?libraries=places&key=' + apiKey;


But I would not like to miss updates from Forge.

Is there any procedure I can do to solve this problem?

Or would it be possible to add in an upcoming update the option to include other APIs (drawing, geometry, localContext, places, visualization)?


Thank you for your help.

Hello @Sérgio Silva,

This is a very interesting use case.

For now we don't see any way you can achieve that without changing the url, but we'll analyze it carefully and it might become a functionality.

We would be very glad if you could share some of the use cases you need to understand what libraries would make sense to be able to include.

Thanks,

Bruno Martinho

Hello Bruno,


For now I'm using the Places library to search for the address. 

For me, it would be great if the Places library was included as an option in the App OutSystemsMaps. However, I think that if this option is made available it may be interesting to include the other Google APIs.


This is the link to my application with the modified URL (script.src = 'https://maps.googleapis.com/maps/api/js?libraries=places&key=' + apiKey; ).

https://personal-fymqmmws.outsystemscloud.com/MapSample/Map

Below is a sample application of the user case I am developing.


Thanks!

Sérgio Silva.

MapSample.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.