A portable electronic device comprising: data processing means ; data repository containing: data records representative of locations relevant to or within a digital map, wherein each data record is associated with a record identifier comprising a first portion and a second portion: the first portion being a location reference; and the second portion being a reference or pointer to information in the data record; and data representative of an index associating words contained in the data records with the record identifiers associated with the data records in which those words appear; and computer readable medium comprising instructions which, when executed by the data processing means, cause the electronic device, in relation to a received search query including a search string derived from user input on a user interface of the electronic device and a search centre derived from a user selected location or from a current location received from a location sensor , to: process the search string to provide one or more search words; query the index to identify data records containing the or each search word; determine a distance from the search centre for each of the one or more identified data records based on the location reference of the record identifier;generate a rank for each of the one or more identified data records indicative of the relevance of each identified data record to the search query and to the determined distance; and cause the display of the results of the search query on a display of the electronic device in rank order. data processing means ; data repository containing: data records representative of locations relevant to or within a digital map, wherein each data record is associated with a record identifier comprising a first portion and a second portion: the first portion being a location reference; and the second portion being a reference or pointer to information in the data record; and data representative of an index associating words contained in the data records with the record identifiers associated with the data records in which those words appear; and data records representative of locations relevant to or within a digital map, wherein each data record is associated with a record identifier comprising a first portion and a second portion: the first portion being a location reference; and the second portion being a reference or pointer to information in the data record; and data representative of an index associating words contained in the data records with the record identifiers associated with the data records in which those words appear; and computer readable medium comprising instructions which, when executed by the data processing means, cause the electronic device, in relation to a received search query including a search string derived from user input on a user interface of the electronic device and a search centre derived from a user selected location or from a current location received from a location sensor , to: process the search string to provide one or more search words; query the index to identify data records containing the or each search word; process the search string to provide one or more search words; query the index to identify data records containing the or each search word; determine a distance from the search centre for each of the one or more identified data records based on the location reference of the record identifier;generate a rank for each of the one or more identified data records indicative of the relevance of each identified data record to the search query and to the determined distance; and cause the display of the results of the search query on a display of the electronic device in rank order. <EOS>