• Shane K 15
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have the following code:
String query = ' ';

query = 'SELECT Id, Name FROM Location ';
        
List <Location> Locations = database.Query(query);

I am getting an error: Illegal assignment from List<SObject> to List<System.Location>
Hello,
 
We have a apex:map visualforce component that displays google maps with various data points on the map. With Winter 22 the maps no longer work. They are erroring out with the following error. Has anyone come across this issue or know what could be causing it? It works fine in Summer 21 release.

User-added image
I have the following code:
String query = ' ';

query = 'SELECT Id, Name FROM Location ';
        
List <Location> Locations = database.Query(query);

I am getting an error: Illegal assignment from List<SObject> to List<System.Location>