Spatial indexes such as R-Tree are widely used for managing spatial objects data efficiently, which is influenced by the popular one-dimensional range index B-Tree. Research has suggested that applying machine learning techniques such as linear regression or a neural network can improve the performance of traditional data structures. However, most studies are focused on tuning recursive learned models or learning a different ordering of data items. Many of them cannot guarantee query accuracy as in the traditional methods. This study investigates a different approach to the learned spatial index, namely Learned Spatial Hashmap (LSPH), which combines the learned model and hashmap. It only requires values from one of the data dimensions to build. Results from experiments on both synthetic and real-world datasets show that our approach significantly reduces the query processing time and maintains 100% accuracy, which is more efficient than traditional spatial indexes and more robust than recently proposed learned spatial indexes.