Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
As described above, in order to make the functions that can be realized by the electronic map richer, the present invention provides a map display method, which specifically includes:
acquiring a region range of a map area displayed in a current display interface;
acquiring all administrative areas contained in the map area based on the region range;
acquiring meteorological information of each administrative region; and
and correspondingly displaying weather icons indicating the weather information of each administrative area on the map area displayed in the current display interface.
In an embodiment of the map display method, optionally, the obtaining the geographical area further includes: and picking up the geographic coordinates of the vertexes of any group of diagonal lines of the minimum external rectangle of the map area to obtain the latitude and longitude numerical range corresponding to the map area as the region range.
In an embodiment of the map display method, optionally, the acquiring all administrative areas included in the map area further includes: and acquiring an administrative area of which the geographic coordinates of the central point of the administrative area fall within the latitude and longitude numerical range from an administrative area database as an administrative area contained in the map area.
In an embodiment of the map display method, optionally, the obtaining of the weather information further includes obtaining the weather information based on an administrative region code of an administrative area.
In an embodiment of the map display method, optionally, all administrative areas included in the map area include a first-class administrative area and a second-class administrative area; and
the above weather icon displaying weather information indicating each administrative area further includes: and in response to the number of the administrative areas included in the map area exceeding a predetermined number, displaying only the weather icons corresponding to the respective types of administrative areas.
In an embodiment of the map display method, optionally, the displaying weather icons indicating weather information of each administrative area further includes: in response to all administrative areas included in the map area including provinces, displaying the provinces with special icons distinguished from non-provinces; and
the weather information of the province is indicated by a special weather icon which is distinguished from the non-province.
In an embodiment of the map display method, optionally, the weather information includes weather data and/or air quality data; and
the weather icons indicating the weather information comprise weather icons and/or haze icons.
In an embodiment of the map display method, optionally, the weather information includes real-time weather information and/or weather forecast information; and
displaying the weather icon further comprises: and correspondingly displaying weather icons indicating real-time weather information and/or weather forecast information of each administrative area on the map area displayed in the current display interface.
The invention provides a map display device, which specifically comprises: a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor configured to:
acquiring a region range of a map area displayed in a current display interface;
acquiring all administrative areas contained in the map area based on the region range;
acquiring meteorological information of each administrative region; and
and correspondingly displaying weather icons indicating the weather information of each administrative area on the map area displayed in the current display interface.
In an embodiment of the map display apparatus, optionally, the processor obtaining the geographical area further includes: and picking up the geographic coordinates of the vertexes of any group of diagonal lines of the minimum external rectangle of the map area to obtain the latitude and longitude numerical range corresponding to the map area as the region range.
In an embodiment of the map display apparatus, optionally, the acquiring, by the processor, all administrative areas included in the map area further includes: and acquiring an administrative area of which the geographic coordinates of the central point of the administrative area fall within the latitude and longitude numerical range from an administrative area database as an administrative area contained in the map area.
In an embodiment of the map display apparatus, optionally, the processor obtaining the weather information further includes obtaining weather information based on an administrative region code of an administrative area.
In an embodiment of the map display apparatus, optionally, all administrative areas included in the map area include a first-type administrative area and a second-type administrative area; and
the above weather icon displaying weather information indicating each administrative area further includes: and in response to the number of the administrative areas included in the map area exceeding a predetermined number, displaying only the weather icons corresponding to the respective types of administrative areas.
In an embodiment of the map display apparatus, optionally, the displaying weather icons indicating weather information of each administrative area further includes: in response to all administrative areas included in the map area including provinces, displaying the provinces with special icons distinguished from non-provinces; and
the weather information of the province is indicated by a special weather icon which is distinguished from the non-province.
In an embodiment of the map display apparatus, optionally, the weather information includes weather data and/or air quality data; and
the weather icons indicating the weather information comprise weather icons and/or haze icons.
In an embodiment of the map display apparatus, optionally, the weather information includes real-time weather information and/or weather forecast information, and
displaying the weather icon further comprises: and correspondingly displaying weather icons indicating real-time weather information and/or weather forecast information of each administrative area on the map area displayed in the current display interface.
The invention also provides a map display system, which comprises the map display device in any one of the above items and a display interface coupled with the map display device.
The present invention also provides a computer storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps in any of the map display methods described above.
According to the map display method, the map display device, the map display system and the computer readable storage medium, weather information can be additionally provided on the basis of the most basic electronic map, so that a user can more intuitively know weather conditions in a map area, and functions which can be realized by the electronic map are enriched. Meanwhile, the map display method, the map display device, the map display system and the computer readable storage medium provided by the invention are based on the administrative regions contained in the map region displayed on the display interface when additionally providing the weather information, so that the weather information is more targeted and easier to realize, and the response is more timely.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. It is noted that the aspects described below in connection with the figures and the specific embodiments are only exemplary and should not be construed as imposing any limitation on the scope of the present invention.
As described above, the present invention provides a map display method, please refer to fig. 1, and fig. 1 shows a flowchart of the map display method provided by the present invention.
As shown in fig. 1, the map display method provided by the present invention includes step 101: acquiring a region range of a map area displayed in a current display interface; step 102: acquiring all administrative areas contained in the map area based on the region range; step 103: acquiring meteorological information of each administrative region; and step 104: and correspondingly displaying weather icons indicating the weather information of each administrative area on the map area displayed in the current display interface.
Specifically, instep 101, the map area displayed on the current display interface refers to the map area currently displayed on the display, that is, the map area viewed by the user in real time. Further, acquiring the region range includes: and picking up the geographic coordinates of the vertexes of any group of diagonal lines of the minimum external rectangle of the map area to obtain the latitude and longitude numerical range corresponding to the map area as a region range.
Generally, the display interface is generally rectangular, and certainly, the display interface is not rectangular, so that the smallest circumscribed rectangle of the map area is taken as an object when picking up the map. By picking the geographic coordinates of the vertices on any set of diagonals of the minimum bounding rectangle, the latitude and longitude numerical range of the displayed map region can be obtained. For example, for a rectangular display interface, the geographic coordinates of the top left vertex of the displayed map area may be taken to be (X)L,YU) And lower right vertex (X)R,YD) Wherein X isL、XRCharacterizing one of longitude or latitude, YU、YDThe other of the longitude or latitude is characterized, and therefore, the maximum and minimum values of the longitude and latitude of the geographic area covered by the map area can be determined.
Specifically, the picking up of the coordinates of the minimum bounding rectangle vertex of the map area can be realized by different algorithms. Latitude and longitude is a type of identifying geographic coordinate data that needs to be structured in a defined coordinate system. Due to differences in ground height and irregularities in the shape of the earth, the information obtained from celestial body measurements (such as satellite navigation systems) is not sufficient for unambiguous calculation of the geographic position, and therefore, a variety of different geographic coordinate systems exist. Such as Beijing 54 coordinate system, Xian 80 coordinate system, 2000 national geodetic coordinate system (CGCS2000), WGS-84 coordinate system adopted by GPS system, etc. It should be understood by those skilled in the art that the latitude and longitude frames mentioned in the method provided by the present invention are configured in a predetermined coordinate system, and are not switched among a plurality of coordinate systems.
Instep 102, the step of obtaining all administrative areas included in the map area further includes: and acquiring an administrative area, in which the geographic coordinates of the central point of the administrative area fall within the acquired longitude and latitude numerical range, from an administrative area database as an administrative area contained in a map area.
Although the geographical range of the map area displayed on the display interface is already acquired instep 101, it is not known which "administrative areas" are in the geographical range, and the weather information corresponding to these "administrative areas" cannot be known, so it is necessary to determine which "administrative areas" are displayed on the display interface.
Specifically, the "administrative area" refers to a corresponding area in the weather information statistics, for example, beijing city, hai lake area, zhejiang province, hangzhou city, xiaoshan area, shanghai city, new area of purdong, and the like. Furthermore, the method provided by the invention can also comprise the steps of acquiring the coordinates of the central points of all administrative areas in the country, and storing the data to establish a database. Therefore, after the geographical range of the map area displayed on the display interface is determined, all administrative areas within the geographical range can be queried in the database through the SQL query statement according to the coordinate principle. The center point of the administrative area may be selected according to different preset rules, and those skilled in the art may acquire the coordinates of the center point by using existing or future technologies, which is not described herein again. Because the areas covered by different areas have different shapes, the data required by the invention can be simplified as much as possible by setting the central point as a reference.
As will be appreciated by those skilled in the art, the coordinate principle described above refers to the fact that the longitude and latitude values of the central point of the administrative area are all within the previously acquired longitude and latitude range. The SQL, Structured Query Language (Structured Query Language), is a special purpose programming Language, and is a database Query and programming Language for accessing data and querying, updating, and managing relational database systems. The SQL query statement is a typical example, and the requirements of the SQL query statement are the most frequent no matter the type or the number of the SQL statement is various, and many statements are often used.
According to the method provided by the invention, the data required in the process of acquiring the administrative areas contained in the map area is relatively simplified, the query is easy, the time consumption is relatively short, and the query efficiency can be improved.
After all the administrative areas included in the map area are found,step 103 is executed to obtain the weather information of each administrative area.
Specifically, in an embodiment, the weather information is further obtained based on an administrative division code of an administrative area. In the above embodiment, after querying all administrative areas included in the map area, the method further includes acquiring administrative division codes of all administrative areas.
The determined administrative region can be effectively characterized by the administrative division code of the administrative region. Therefore, the weather information of each administrative area can be accurately acquired by acquiring the weather information of each administrative area through the administrative division code, and deviation is not easy to occur.
It should be understood by those skilled in the art that the above-mentioned acquiring of the weather information of each administrative area by the administrative division code is only an example of acquiring the weather information of the administrative area, and is not an exclusive limitation to acquiring the weather information of each administrative area.
Further, the weather information comprises weather data and/or air quality data; and the weather icon used to indicate weather information instep 104 comprises a weather icon and/or a haze icon. Further, the weather information includes real-time weather information and/or weather forecast information. Specifically, the weather data includes real-time weather conditions and/or weather forecasts, such as sunny, cloudy, and light rain. The air quality data includes real-time air quality conditions and/or predicted air quality conditions, and may be characterized by, for example, an air quality index, a haze icon, and the like.
Further, the weather icons displayed instep 104, including the weather icon and the haze icon, may be preset according to the weather conditions. Moreover, the real-time weather information and the weather forecast information can be distinguished through color change, transparency change or characters.
Furthermore, for the icon corresponding to the weather data only needs to be displayed, or the icon corresponding to the air quality data only needs to be displayed, or the icon corresponding to the weather data and the air quality data need to be displayed simultaneously is selected by the user. Moreover, the icon corresponding to the real-time weather information only needs to be displayed, or the icon corresponding to the weather forecast information only needs to be displayed, or the icon corresponding to the real-time weather information and the weather forecast information need to be displayed simultaneously is selected by the user. The user requirements can be met by responding to the selection of the user, and the method is more humanized.
After the weather information of each administrative area has been acquired, step 140 is executed: and correspondingly displaying weather icons indicating the weather information of each administrative area on the map area displayed in the current display interface. Further, the weather icon may be set in the same layer, and the priority of the layer in which the weather icon is located may be higher than the priority of the layer in which the displayed russian map area is located, and the weather icon indicating the weather information of each administrative area may be displayed in a manner of displaying both layers. It should be noted that the above example of displaying the weather icon indicating the weather information of each administrative area is merely illustrative, and a person skilled in the art may obtain the weather information of each administrative area and then correspondingly display the weather icon indicating the weather information of each administrative area on the map area according to the existing or future technology.
As described above, instep 102, acquiring all administrative areas included in the map area further includes: and acquiring an administrative area, in which the geographic coordinates of the central point of the administrative area fall within the acquired longitude and latitude numerical range, from an administrative area database as an administrative area contained in a map area. Because the map area displayed on the current display interface can be displayed by different scales, the region range covered by the map area displayed on the current display interface is different under the change of different scales. When the scale of the map is larger, the area of the map displayed is smaller, and the area displayed on the map is more detailed. When the scale of the map is smaller, the area covered by the displayed map area is larger, and the area displayed on the map only keeps the emphasis.
Therefore, if the scale of the currently displayed map is too small, the number of all administrative areas included in the map area acquired instep 102 is huge. If the weather icons indicating the weather information of each administrative area are all displayed, the whole display interface is probably the weather icon due to the fact that the weather icon is also large and the visual effect is poor; the second is that the display is not meaningful, and when the scale of the map is reduced, the user wants to macroscopically know the weather conditions of various places and does not need to display the weather conditions in too detail. Therefore, the method provided by the invention further comprises the following steps of when all the contained administrative regions are obtained: all the administrative areas are classified into a first-class administrative area and a second-class administrative area, and the number of the first-class administrative areas is set not to exceed a predetermined number of weather icons that can be displayed on the display interface with a better visual effect, so that only the weather icons corresponding to the respective first-class administrative areas are displayed in response to the number of the administrative areas included in the map area exceeding the predetermined number.
More specifically, the above-described classification of all administrative regions may correspond to various different classification criteria.
In an embodiment, the administrative regions specified by the constitution of China may be classified into provincial administrative regions, prefectural administrative regions and rural administrative regions according to the division thereof, and all the administrative regions may be classified into one-class administrative regions and two-class administrative regions according to the predetermined number of displayed weather icons and the number of each class of the administrative regions after the hierarchical division thereof.
Further, in the above-described embodiment, if a plurality of classified administrative regions are included in the class of administrative regions, and the plurality of lower-level administrative regions include provincial meeting cities, the provincial meeting cities may be displayed on the map with a special icon different from the non-provincial meetings, and correspondingly, the weather information indicating the provincial meetings is different from the special weather icons of the non-provincial meetings. The special icon and the special weather icon may be in the shape, color, or additionally marked with other symbols to represent the provincial city. Because under the condition of a small scale, the province city is specially displayed, the boundary between different areas of the user can be indicated, the user can be macroscopically held, and the user experience is strong.
In another embodiment, the user uses the map for navigation, if the user is performing a cross-province trip, the covered region range is wide, the scale of the map is small when the navigation function is started and the route is determined, and at this time, the number of administrative areas included in the map area is large, so that the administrative areas along the navigation route can be set as an administrative area of the same type, thereby reducing the number of weather icons to be displayed. In addition, the user can be more clear of the weather conditions on the driving route, and the travel can be prepared and is more humanized.
It should be noted that the above examples of different classification criteria for classifying administrative areas are only illustrative, and are not exclusive limitations on different classification criteria.
Therefore, the map display method provided by the invention has been described, and according to the map display method provided by the invention, the weather conditions of the corresponding region can be displayed on the display interface by searching the space range of the map region displayed on the display interface, and corresponding level changes can be made according to the scale, so that a user can know the weather conditions at a glance when viewing the map and using navigation, thereby facilitating the user and improving the user experience.
The invention also provides a map display device, please refer to fig. 2, and fig. 2 shows a schematic diagram of the map display device. As shown in fig. 2, themap display apparatus 200 includes aprocessor 201 and a memory 202. Theprocessor 201 of themap display apparatus 200 can implement the map display method described above when executing the computer program stored in the memory 202, for which reference is specifically made to the description about the map display method, which is not repeated herein.
The invention further provides a map display system, which at least comprises themap display device 200 and thedisplay interface 300. Themap display apparatus 200 includes aprocessor 201 and a memory 202. Theprocessor 201 of themap display apparatus 200 can implement the map display method described above when executing the computer program stored in the memory 202, for which reference is specifically made to the description about the map display method, which is not repeated herein.
Thedisplay interface 300 is an interface displayed on a display screen of a display, and the map display method provided by the invention is realized by themap display device 200 and is finally displayed on thedisplay interface 300. The display on which thedisplay interface 300 is located and themap display apparatus 200 may be integrated, such as an existing smart phone; or may be separate, such as a computer monitor, for receiving signals and displaying corresponding content. However, whether the display on which thedisplay interface 300 is located is integrated with themap display apparatus 200 or separated from themap display apparatus 200, thedisplay interface 300 needs to be coupled with themap display apparatus 200, so that the content displayed by thedisplay interface 300 can be controlled by themap display apparatus 200.
The map display method, the map display device and the map display system provided by the invention have been described so far. The present invention also provides a computer storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the map display method as described above.
Those of skill in the art would understand that information, signals, and data may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits (bits), symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the description of the present invention, it should be noted that, unless explicitly stated or limited otherwise, the terms "mounted" and "coupled" are to be construed broadly, e.g., as meaning fixedly attached, detachably attached, or integrally attached; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The various illustrative logical modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disc), as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disks) usually reproduce data magnetically, while discs (discs) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.