CN112699324A - Content display method and device, electronic equipment and computer readable medium - Google Patents

Content display method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112699324A
CN112699324A CN202110037213.1A CN202110037213A CN112699324A CN 112699324 A CN112699324 A CN 112699324A CN 202110037213 A CN202110037213 A CN 202110037213A CN 112699324 A CN112699324 A CN 112699324A
Authority
CN
China
Prior art keywords
position information
user
map
value
coordinate system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110037213.1A
Other languages
Chinese (zh)
Other versions
CN112699324B (en
Inventor
朱颖妍
刘鑫
孙傲
陈志得
吴康瑞
肖裕鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110037213.1A priority Critical patent/CN112699324B/en
Publication of CN112699324A publication Critical patent/CN112699324A/en
Application granted granted Critical
Publication of CN112699324B publication Critical patent/CN112699324B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)

Abstract

The application discloses a content display method, a content display device, electronic equipment and a computer readable medium, which relate to the field of computers, and the method comprises the following steps: acquiring first position information of a user position and second position information of a target position; acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a scale of the custom map and an included angle between a plane where the custom map is located and a plane where a world plane coordinate system is located; and adding and displaying the first mark content and the second mark content in the customized map based on the user position information and the target position information, and displaying the customized map added with the first mark content and the second mark content in a specified interface. Therefore, when the position information of the user position and the position information of the destination are determined, the map software is not used, and the over-slow calling speed of the map software caused by poor network when the map software is called can be reduced.

Description

Content display method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of computers, and in particular, to a content display method, device, electronic device, and computer readable medium.
Background
Currently, web applications can mark users on custom maps based on their location. However, in the process, the map software is called through a designated API to acquire the position information of the user and other places, so as to complete the drawing of the custom map. Then, because map software needs to be called, the speed of the calling result is affected by the network condition, so that the drawing process of the custom map is too slow.
Disclosure of Invention
The application provides a content display method, a content display device, an electronic device and a computer readable medium, so as to overcome the defects.
In a first aspect, an embodiment of the present application provides a content display method, where the method includes: acquiring first position information of a user position and second position information of a target position, wherein the first position information and the second position information are coordinate points in a world plane coordinate system; acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane of the user-defined map and a plane of a world plane coordinate system, wherein the user position information and the target position information are both located in the map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the user-defined map; adding first marking content and second marking content in the custom map based on the user position information and target position information, wherein the first marking content is used for marking the user position in the custom map, and the second marking content is used for marking the target position in the custom map; and displaying the customized map added with the first mark content and the second mark content in a specified interface.
In a second aspect, an embodiment of the present application further provides a content display apparatus, where the apparatus includes: the device comprises an acquisition unit, a determination unit, an adding unit and a display unit. The device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring first position information of a user position and second position information of a target position, and the first position information and the second position information are coordinate points in a world plane coordinate system. The determining unit is used for obtaining user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located, wherein the user position information and the target position information are both located in a map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the user-defined map. And the adding unit is used for adding a first mark content and a second mark content in the custom map based on the user position information and the target position information, wherein the first mark content is used for marking the user position in the custom map, and the second mark content is used for marking the target position in the custom map. And the display unit is used for displaying the customized map added with the first mark content and the second mark content in a specified interface.
In a third aspect, an embodiment of the present application further provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the above-described methods.
In a fourth aspect, the present application also provides a computer-readable storage medium, where a program code executable by a processor is stored, and when executed by the processor, the program code causes the processor to execute the above method.
The content display method, device, electronic equipment and computer readable medium provided by the application acquire first position information of a user position and second position information of a target position, in addition, the first position information and the second position information are coordinate points in a world plane coordinate system, the webpage application program obtains user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located, and then, adding first mark content and second mark content in the customized map based on the user position information and the target position information, and displaying the customized map added with the first mark content and the second mark content in a specified interface of the webpage application program. Therefore, when the position information of the user position and the position information of the destination are determined, the map software is not used but is acquired through a built-in content display method, and the speed of calling the map software due to poor network when the map software is called can be reduced.
Additional features and advantages of embodiments of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of embodiments of the present application. The objectives and other advantages of the embodiments of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a web application list interface provided by an embodiment of the present application;
FIG. 2 is a flow chart of a method of displaying content according to an embodiment of the present application;
FIG. 3 illustrates a method flow diagram of a content display method provided by another embodiment of the present application;
fig. 4 shows a flowchart of S310 in fig. 3;
FIG. 5 is a schematic diagram illustrating a designated location area provided by an embodiment of the present application;
FIG. 6 shows a schematic diagram of a world plane coordinate system provided by an embodiment of the present application;
fig. 7 shows a flowchart of S340 in fig. 3;
FIG. 8 is a schematic diagram of an auxiliary line provided in an embodiment of the present application;
FIG. 9 illustrates a method flow diagram of a content display method provided by yet another embodiment of the present application;
fig. 10 shows a flowchart of S940 in fig. 9;
FIG. 11 illustrates a schematic diagram of reference points provided by embodiments of the present application;
FIG. 12 shows a schematic diagram of a route provided by an embodiment of the present application;
FIG. 13 is a flow chart of a method of displaying content according to yet another embodiment of the present application;
FIG. 14 is a schematic diagram illustrating a display button provided by an embodiment of the present application;
FIG. 15 is a schematic diagram illustrating query information provided by an embodiment of the present application;
FIG. 16 is a schematic diagram illustrating a custom map provided by an embodiment of the present application;
fig. 17 shows a block diagram of a content display apparatus according to an embodiment of the present application;
fig. 18 is a block diagram illustrating a structure of an electronic device according to an embodiment of the present disclosure;
fig. 19 illustrates a storage unit provided in an embodiment of the present application and configured to store or carry program codes for implementing a content display method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 shows a Web Application list interface, in which at least one icon and name of a Web Application are displayed, and the Web Application can be started by clicking the icon or the name. In particular, a web application is an application written in a web language that is built based on standard web technology. Unlike traditional websites, the Web App emphasizes allowing users to perform various operations, rather than simply browsing the content of a Web page. Such as sending an email, finding a house, paying a bill, transferring money, shopping, sending an invitation, etc. The traditional webpage has content guidance, static information is used for providing convenient browsing and consumption, and the webpage application program is an application which can be used without downloading and installing, namely without installing and uninstalling.
The web application may be attached to the target client, that is, the user can start the web application in the target client, the target client may be a browser client, the web application function is also a web page opened by the browser client, and the target client may also be a non-browser client, for example, the target client may be a wechat, and the web application is an applet in the wechat. The web application may be based on the architecture of the target client and written in html5 language.
Each web application can implement a function, in the embodiment of the present application, the web application can display the location of the user and the location between the user and the destination, that is, a map interface can be displayed, the location of the user is displayed in the map interface, or the location and the destination location of the user are displayed at the same time, and even other contents can be displayed, for example, information of merchant stores, tourist attractions, and the like near the location of the user.
However, the inventor has found in research that, when displaying map content, a web page or a web application needs to call map software to obtain location information of a user and other location information. Specifically, the web Application and the map software may be connected through an Application Programming Interface (API), that is, the web Application sends a location data obtaining request to the map software through the API, and the map software obtains the location data from a server corresponding to the map software and sends the location data to the web Application. Then, in the process, map software needs to be called and a network needs to be used to obtain the position data, so that the speed of displaying the map content is affected by the network quality, and when the network quality is poor, for example, when the network speed is too slow, the network is unstable or the network packet loss is severe, the speed of obtaining the position data by the web application program is too slow, so that the speed of displaying the map content by the web application program is too slow, the waiting time of a user is too long, and the user experience is poor.
In order to overcome the above drawbacks, embodiments of the present application provide a content display method and apparatus, where when determining location information of a location of the user and location information of a destination, map software is not used, but is obtained through a built-in positioning algorithm, so that a speed of calling the map software, which is too slow due to a poor network when the map software is called, can be reduced.
Specifically, referring to fig. 2, fig. 2 shows a content display method, which is applied to the web application program, but may also be applied to a web page of a browser or other application software, which is not limited herein, and specifically, the method includes: s201 to S204.
S201: first position information of a user position and second position information of a target position are acquired.
The first position information and the second position information are Coordinate points in a world plane Coordinate System, wherein the world plane Coordinate System can be regarded as a projection Coordinate System of a Geographic Coordinate System and is a plane Coordinate, wherein the Geographic Coordinate System (Geographic Coordinate System) is a spherical Coordinate, and defines the surface position of the earth by using a three-dimensional spherical surface, so as to realize a Coordinate System which is referenced to the surface position of the earth by longitude and latitude, and each point in the Geographic Coordinate System is represented by longitude and latitude. The Projection Coordinate System (Projection Coordinate System) is a kind of plane coordinates. The projection coordinate system uses a coordinate system based on X, Y values to describe where a point on the earth is located. This coordinate system is obtained by projecting from an approximate ellipsoid of the earth, and a certain area on a map is usually projected on a plane, and the formed coordinate system is called a projection coordinate system. The world plane coordinate system may be a WGS-84 coordinate system, a GCJ-02 coordinate system, a BD-09 coordinate system, or the like, without limitation.
As an implementation manner, the implementation manner of acquiring the first location information and the second location information may be to acquire a first longitude and latitude of the user location and a second longitude and latitude of the target location, and obtain the first location information of the user location and the second location information of the target location according to the first longitude and latitude of the user location and the second longitude and latitude of the target location. Specifically, the first longitude and latitude and the second longitude and latitude may be coordinate values of the user and the target location in a geographic coordinate system, and the first location information corresponding to the first longitude and latitude and the second location information corresponding to the second longitude and latitude may be determined in a coordinate projection manner.
In some embodiments, for some scenarios where the target location is fixed, the second location information of the target location may be pre-stored, and when the first location information of a new user is obtained again, the second location information of the target location may not be determined again, but may be directly read. In other embodiments, for some scenes in which the target position changes in real time or the change frequency is high, the second position information of the target position may be obtained again at the same time of obtaining the first position information of a new user.
As an embodiment, the operation of acquiring the first location information of the user location and the second location information of the target location based on the positioning algorithm preset by the web application may be triggered based on a request of the user. For example, when the web application is running, the user inputs a display request of a custom map in the web application, and when the web application detects the request, the operation of acquiring the first location information and the second location information is performed.
As another embodiment, when the designated interface of the web application is displayed, the operation of acquiring the first position information of the user position and the second position information of the target position based on the positioning algorithm preset by the web application may be automatically performed. Wherein the designated interface can be an interface for displaying the custom map.
S202: and acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located.
In one embodiment, the user location information and the target location information are both located in a map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the custom map. The custom map can be regarded as a Canvas (Canvas) provided by a webpage application program, the Canvas is an HTML5 element used for drawing graphics, and drawing paths, images and various graphics are completed through scripts (e.g., JavaScript). The plane coordinate system corresponding to the customized map may be regarded as a screen coordinate system, and as an embodiment, the plane coordinate system may be a screen coordinate system corresponding to a screen of the electronic device running the web application. The customized map may be a screen coordinate system corresponding to the whole screen, or may be a coordinate system corresponding to a certain partial area of the screen, specifically, determined by the display size of the customized map on the screen.
Because the distance between the user position and the target position in the world plane coordinate system is far larger than the size of the customized map, the position relationship between the first position information and the second position information can be presented in the customized map only by zooming the first position information and the second position information according to the scale of the customized map. In addition, an included angle may exist between the plane of the customized map and the plane of the world plane coordinate system, that is, the plane of the customized map and the plane of the world plane coordinate system may not be in a parallel relationship, specifically, the plane of the customized map may refer to the plane of the canvas, and the plane of the world plane coordinate system is parallel to the screen on which the screen coordinate system is located, that is, if each point in the world plane coordinate system is directly displayed on the screen, the viewing angle of each point in the world plane coordinate system viewed by the user through the screen should be an angle perpendicular to the ground plane. Therefore, the included angle between the plane of the custom map and the plane of the world plane coordinate system can be regarded as the visual angle of the custom map relative to the custom map when the custom map is displayed on the screen and the user looks at the screen.
Because the included angle between the plane of the customized map and the plane of the world plane coordinate system may cause the angular relationship and the distance between each position point of the world plane coordinate system to change due to the included angle, for example, if the first position point in the world plane coordinate system is located right above the second position point, the first position point may be located right above, left above, right below or left below the second position point in the customized map, specifically, if the inclination direction of the plane of the customized map relative to the plane of the world plane coordinate system is different, the angle value of the included angle may be different, and further, the positional relationship between the first position point and the second position point may be different, specifically, based on the preset scale of the customized map and the included angle between the plane of the customized map and the plane of the world plane coordinate system, the following embodiments may be referred to for the implementation of obtaining the user location information corresponding to the first location information and the target location information corresponding to the second location information.
S203: and adding first mark content and second mark content in the custom map based on the user position information and the target position information.
The first marking content is used for marking the user position in the custom map, and the second marking content is used for marking the target position in the custom map. The marking content may be at least one of a pattern and a text. As an embodiment, the first and second mark contents may both be patterns, and the first and second mark contents may be patterns having the same shape but different colors or sizes. In other embodiments, the target and the user may both be people, a first avatar of the user and a second avatar of the target may be obtained, the first avatar being the first tagged content and the second avatar being the second tagged content. If the target is a place name, for example, a city or a country. The first marked content is the head portrait of the user, and the second marked content is the pattern of the landmark corresponding to the target.
In some embodiments, in addition to the user position information and the target position information, other position information within the range of the user position and the target position may be obtained, for example, the positions of other landmarks within the area range of the user position information and the target position information, where the landmarks may be buildings, mountains, rivers, or the like, and mark content corresponding to the positions of other landmarks is also added in the customized map, so that the content displayed by the customized map can be richer.
S204: and displaying the customized map added with the first mark content and the second mark content in a specified interface.
The designated interface may be the interface for triggering the web application to acquire the first location information of the user location and the second location information of the target location, for example, the interface may be a home page of the web application, or may be an interface on which a trigger button is displayed, and the user triggers the web application to acquire the first location information of the user location and the second location information of the target location by triggering the trigger button, or of course, may be other interfaces, which are not limited herein.
Therefore, when the position information of the user position and the position information of the destination are determined, the map software is not used, but is acquired through a built-in positioning algorithm, and the speed of calling the map software due to poor network when the map software is called can be reduced. In addition, the user position and the target position are displayed on the customized map of the webpage application program, and the content in the map display interface of the map software is not used, so that the displayed content is more in line with the display requirement of the webpage application program, and the time consumed for acquiring the data of the map display interface of the map software can be reduced.
Specifically, referring to fig. 3, fig. 3 illustrates a content display method, which is applied to the web application, but may also be applied to a web page of a browser or other application software, which is not limited herein. Specifically, the method comprises the following steps: s310 to S360.
S310: first position information of a user position and second position information of a target position are acquired.
And the first position information and the second position information are coordinate points in a world plane coordinate system. Specifically, the description of the world plane coordinate system may refer to the foregoing embodiment, as an implementation, the world plane coordinate system is a plane coordinate system, the coordinate plane of the plane coordinate system is an XOY plane, the XOY plane is parallel to the ground plane, the first location information is formed by X-coordinate values and Y-coordinate values of the user location in the world plane coordinate system, and similarly, the second location information is formed by X-coordinate values and Y-coordinate values of the target location in the world plane coordinate system. As an implementation manner, the first location information may be determined according to the latitude and longitude of the user location, and the second location information may be determined according to the latitude and longitude of the target location. As shown in fig. 4, the S310 includes: s311 to S313.
S311: and acquiring a first longitude and latitude of the user position and a second longitude and latitude of the target position.
And the first longitude and latitude and the second longitude and latitude are coordinate values of the user position and the target position in the geographic coordinate system. As an embodiment, the user position may be collected by a positioning module in the user terminal, wherein the positioning module may be a GPS locator or a base station positioning system. The user terminal may be a terminal for running the web application, for example, the user terminal may be an electronic device capable of running the application, such as a smart phone, a tablet computer, and an intelligent wearable device. And the second longitude and latitude of the target position can be acquired by other terminals with positioning functions and is given to the webpage application program, so that the webpage application program can acquire the second longitude and latitude of the target position.
S312: and determining the latitude and longitude area range based on the designated position area corresponding to the self-defined map.
In one embodiment, the customized map corresponds to a designated location area that is an area that the web application wishes to display on the customized map, for example, the designated location area may be an area within a designated distance of the target location, for example, an area within 100 kilometers of the target location.
As an embodiment, if the target location is a fixed location or a location with a small variation frequency, the designated location area is an area capable of covering the target location, for example, if the target location is a certain city, the designated location area includes the certain city, that is, the designated location area may be determined based on the longitude and latitude of the target location. As another embodiment, a target area corresponding to the target location may be further determined, and the area capable of covering the target area is used as the designated location area, where the target area may be set according to an actual requirement, and the target area is larger than the area corresponding to the target location, for example, if the target location is a certain city, the target area may be a province or a country where the certain city is located.
In one embodiment, the web application sets a plurality of location points from which the designated location area is determined, and specifically, an outline area may be formed from the plurality of location points, and the outline area is the designated location area. In some embodiments, the number of the plurality of location points is 4, the designated location area is a rectangle, the 4 location points are 4 vertices of the rectangle, each vertex corresponds to a longitude and latitude, and the 4 location points are used for determining a minimum longitude and latitude, a maximum longitude and latitude, a southwest corner longitude and latitude, and a northeast corner longitude and latitude, so that the designated location area can be determined. Specifically, the minimum longitude and latitude, the maximum longitude and latitude, and the southwest angle longitude and latitude and the northeast angle longitude and latitude can be obtained through a mapcontext.
As shown in fig. 5, the points O, a, B, and C are 4 vertices that are preset, each vertex corresponds to one longitude and latitude, the X axis is the longitude direction, the Y axis is the latitude direction, the latitude values of the points on the X axis are the same and different, the longitude values of the points on the Y axis are the same and different, the point O is located in the north direction of the point a and in the west direction of the point C, and a rectangular area surrounded by the points O, a, B, and C is regarded as a designated location area. The minimum latitude of the O point is the largest, the maximum latitude of the C point is the largest, the minimum latitude of the A point is the smallest, the maximum latitude of the B point is the smallest, the southwest angle longitude and latitude is the longitude and latitude of the A point, and the northeast angle longitude and latitude is the longitude and latitude of the C point.
S313: and determining first position information of the first longitude and latitude in the world plane coordinate system and second position information of the second longitude and latitude in the world plane coordinate system.
Assuming that the point O is the origin of coordinates, a world plane coordinate system of the XOY plane is established along the X direction and the Y direction, as shown in fig. 6, the world plane coordinate system is a plane projection coordinate system corresponding to a specified location area surrounded by the point O, the point a, the point B, and the point C, that is, the world plane coordinate system is a plane coordinate system corresponding to the latitude and longitude area range. And coordinate values of the longitude and latitude of each position point in the specified position area in a world plane coordinate system can be obtained based on the longitude and latitude of each point.
Specifically, the shape of the earth approximates an ellipsoid with the two poles being flat and the largest radius at the equator. The average radius of the equator is: 6378137m, half of the distance between the two poles of the earth, and the length of the semiminor axis is 6356752 m. Let the longitude and latitude of the O point be (o.lng, o.lat), where o.lat represents the latitude of the O point and o.lng represents the longitude of the O point. The longitude and latitude of the point B are (b.lng, b.lat), where b.lat represents the latitude of the point B and b.lng represents the longitude of the point B.
Let MACRO _ AXIS be 6378137, i.e. average radius of equator, and MINOR _ AXIS be 6356752, i.e. MINOR _ AXIS is half of earth's polar distance. Let a be MACRO _ AXIS2That is, a is the square of the average radius of the equator, and b is assumed to be MINOR _ AXIS2I.e. b is the square of half the distance between the two poles of the earth.
Definition c ═ (tan (2 · o.lat ·/360))2
Figure BDA0002894768130000091
The X-axis coordinate X of the point B is obtained according to the following formula (1)b
xb=d*(2*b.lng*π/360-2*o.lng*π/360) (1)
The X-axis coordinate X of point BbThe value of (2) can be used as the difference value of the coordinate values of the X axis between the point O and the point C in the world plane coordinate system, namely, the distance of OC, and the width value of the designated position area in the world plane coordinate system.
Definition e ═ 1/tan (2 ═ pi/360)2
Figure BDA0002894768130000092
Then f ═ tan (2 ═ b @/360) can be obtained2,g=1/tan(2*b.lat*π/360)2
Figure BDA0002894768130000093
The Y-axis coordinate Y of the point B is obtained according to the following formula (2)b
Figure BDA0002894768130000094
I.e., the value of Y obtained according to the formula (2) as the coordinate Y of the Y-axis of the B pointb
The Y-axis coordinate Y of point BbThe value of (b) may be a difference value of the Y-axis coordinate value between the point O and the point a in the world plane coordinate system, that is, a distance of OA, and may be a height value of the designated location area in the world plane coordinate system.
Thus, the coordinates (x) of the point B in the world plane coordinate system can be specified by the above equations (1) and (2)b,yb). When first position information of a first longitude and latitude of a user position in the world plane coordinate system needs to be acquired, the longitude value and the latitude value corresponding to the first longitude and latitude can be substituted into the formulas (1) and (2), namely b.lng in the formula is replaced by the longitude value corresponding to the first longitude and latitude, b.lat in the formula is replaced by the latitude value corresponding to the first longitude and latitude, and then first position information, namely a coordinate (x) of the user position in the world plane coordinate system is acquired according to the formulan,yn). Similarly, when second position information of the second longitude and latitude of the target position in the world plane coordinate system needs to be acquired, the longitude value and the latitude value corresponding to the second longitude and latitude can be substituted into the formulas (1) and (2), namely b.lng in the formula is replaced by the longitude value corresponding to the second longitude and latitude, b.lat in the formula is replaced by the latitude value corresponding to the second longitude and latitude, and then second position information, namely the coordinate information of the target position in the world plane coordinate system is acquired according to the formulas(xm,ym)。
S320: and determining third position information corresponding to the first position information and fourth position information corresponding to the second position information in the map coordinate system based on the scale of the self-defined map.
As described in the foregoing embodiment, the custom map is provided with the scale, when each position point in the world plane coordinate system is displayed in the custom map, conversion needs to be performed according to the scale, and a coordinate value of each position point to be displayed in the world plane coordinate system is converted into a coordinate in the map coordinate system, so that a coordinate corresponding to the first position information in the map coordinate system after conversion according to the scale is defined as third position information, and a coordinate corresponding to the second position information in the map coordinate system after conversion according to the scale is defined as fourth position information. It should be noted that the third position information and the fourth position information may be positions of the user position and the target position in the map coordinate system, or may be position information after the third position information and the fourth position information are changed according to an angle difference between the map coordinate system and the world plane coordinate system, as positions of the user position and the target position in the map coordinate system.
Then, assuming that the scale of the custom map includes the width value and the height value of the custom map, the width value of the custom map is named as cWidth, and the height value of the custom map is named as cwight, that is, the width of the map coordinate system is cWidth, and the height is cwight.
The coordinates of each position point in the world plane coordinate system in the map coordinate system corresponding to the customized map are obtained according to the following formulas (3) and (4):
x’=cWidth/xb*x (3)
y’=cHeight/yb*y (4)
wherein x and y are coordinate values in the world plane coordinate system, and x 'and y' are coordinate values in the map coordinate system. If the third position information corresponding to the first position information is to be acquired, the third position information will be acquiredCoordinates (x) corresponding to the first position informationn,yn) Substituting into equations (3) and (4) to obtain the coordinates (x)n’,yn') is the third location information of the user's location within the custom map. Similarly, if the fourth position information corresponding to the second position information is to be acquired, the coordinate (x) corresponding to the second position information is obtainedm,ym) Substituting into equations (3) and (4) to obtain the coordinates (x)m’,ym') is the fourth location information of the target location in the custom map.
S330: and acquiring an included angle between the plane of the user-defined map and the plane of the world plane coordinate system.
S340: and determining user position information corresponding to the third position information and target position information corresponding to the fourth position information based on the included angle.
As an embodiment, it is determined whether the included angle is smaller than a specified angle, wherein the specified angle is a smaller angle value, and specifically, may be set according to actual conditions, and may be a value in a range of-3 ° to 3 °, for example. In general, when the included angle is smaller than a specified angle, it may be considered that the plane where the custom map is located is parallel to the plane where the world plane coordinate system is located, and then the third location information may be used as the user location information and the fourth location information may be used as the target location information, that is, the obtained third location information and the obtained fourth location information may be used as the location of the user in the custom map and the location of the target in the custom map.
If the included angle is larger than or equal to the specified angle, it can be considered that the plane where the custom map is located is not parallel to the plane where the world plane coordinate system is located, the difference between the orientation relationship of the user and the target position in the world plane coordinate system and the orientation relationship in the map coordinate system corresponding to the custom map is large due to the included angle between the plane where the user and the target are located and the plane where the user and the target are located in the custom map is required to be re-determined according to the included angle based on the third position information and the fourth position information. Specifically, as shown in fig. 7, S340 includes: s341 to S343.
S341: an auxiliary line set in advance in the map coordinate system is determined.
In one embodiment, the inclination direction of the plane of the custom map relative to the plane of the world plane coordinate system may include an abscissa axis direction or an ordinate axis direction. If the inclination direction is the abscissa axis direction, the ordinate axis of the map coordinate system corresponding to the user-defined map is parallel to the ordinate axis of the world plane coordinate system, and the abscissa axis of the map coordinate system is not parallel to the abscissa axis of the world plane coordinate system, namely, the included angle is larger than the specified angle. If the inclination direction is the direction of the ordinate axis, the abscissa axis of the map coordinate system corresponding to the user-defined map is parallel to the abscissa axis of the world plane coordinate system, and the ordinate axis of the map coordinate system is not parallel to the ordinate axis of the world plane coordinate system, namely, the included angle is larger than the specified angle.
Then if the inclination direction is the abscissa axis direction, the auxiliary line is parallel to the ordinate axis, i.e., the auxiliary line is a straight line crossing a certain point of the abscissa axis and parallel to the ordinate axis. If the inclination direction is the direction of the ordinate axis, the auxiliary line is parallel to the abscissa axis, i.e., the auxiliary line is a straight line passing through a certain point of the ordinate axis and parallel to the abscissa axis.
In the embodiment of the present application, the inclination direction is the direction of the ordinate axis, the auxiliary line is a straight line passing through a certain point of the ordinate axis and parallel to the abscissa axis, as shown in fig. 8, the dotted line L is an auxiliary line, and the ordinate of the intersection of the auxiliary line and the ordinate axis is yLThe abscissa is 0. Note that the abscissa axes are both longitudinal directions, and the ordinate axes are both latitudinal directions.
S342: and acquiring a first position relation between the third position information and the auxiliary line and a second position relation between the fourth position information and the auxiliary line.
Wherein the positional relationship includes being located before the auxiliary line in the oblique direction and being located after the auxiliary line in the oblique direction. Specifically, taking the tilt direction as the ordinate axis direction as an example, the position relationship between a certain position point and the auxiliary line is located before the auxiliary line in the tilt direction, which can be understood as being along the ordinate axis direction, and the ordinate value of the position point is greater than that of the auxiliary line; the positional relationship between a position point and the auxiliary line is located behind the auxiliary line in the oblique direction, and it can be understood that the ordinate value of the position point is smaller than the ordinate value of the auxiliary line in the ordinate axis direction.
In one embodiment, a numerical value on the coordinate axis corresponding to the auxiliary line in the tilt direction is designated as a reference coordinate value, that is, an intersection of the auxiliary line and the coordinate axis corresponding to the tilt direction is designated as a reference coordinate value, a numerical value on the coordinate axis corresponding to the tilt direction of the third positional information is designated as a third designated coordinate value, and a numerical value on the coordinate axis corresponding to the tilt direction of the fourth positional information is designated as a fourth designated coordinate value. Taking the tilt direction as the ordinate axis direction as an example, the ordinate value of the auxiliary line is named as a reference coordinate value, the ordinate value of the third position information is named as a third designated coordinate value, and the ordinate value of the fourth position information is named as a fourth designated coordinate value.
In one embodiment, the first positional relationship is determined based on a third designated coordinate value of the third positional information and a reference coordinate value of the auxiliary line, and the second positional relationship is determined based on a fourth designated coordinate value of the fourth positional information and a reference coordinate value of the auxiliary line. Specifically, if the third specified coordinate value is larger than the reference coordinate value, the first positional relationship is determined to be located before the auxiliary line in the tilt direction, and if the third specified coordinate value is smaller than the reference coordinate value, the first positional relationship is determined to be located after the auxiliary line in the tilt direction. Similarly, if the fourth specified coordinate value is greater than the reference coordinate value, the second positional relationship is determined to be located before the auxiliary line in the tilt direction, and if the fourth specified coordinate value is less than the reference coordinate value, the second positional relationship is determined to be located after the auxiliary line in the tilt direction.
S343: and determining user position information corresponding to the third position information based on the included angle and the first position relation, and determining target position information corresponding to the fourth position information based on the included angle and the second position relation.
Since the position relationship between the position point and the auxiliary line is such that the ordinate value of the position point is greater or less than the ordinate value of the auxiliary line in both cases before the auxiliary line in the oblique direction and after the auxiliary line in the oblique direction, respectively, it is possible to increase or decrease, in two different position relationships, an offset value, which is an offset value of the ordinate value of the position point determined on the basis of the angle in two different coordinate systems, on the basis of the ordinate value of the position point in the two different coordinate systems, the offset value being determined on the basis of the numerical value on the coordinate axis corresponding to the oblique direction of the position point, the reference coordinate value and the angle.
Specifically, the embodiment of determining the user location information corresponding to the third location information based on the included angle and the first location relationship is as follows: acquiring an absolute value of a difference value between the third designated coordinate value and the reference coordinate value, and recording the absolute value as a first difference value; taking the product of the first difference value and the trigonometric function value of the included angle as a first offset value; if the first positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the third designated coordinate value and the first offset value as a first coordinate value; if the first positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the third designated coordinate value and the first offset value as a first coordinate value; setting another coordinate value other than a third designated coordinate value of the third position information as a second coordinate value; and taking the first coordinate value and the second coordinate value as the user position information.
As an embodiment, taking the inclination direction as the ordinate axis direction as an example, assume the reference coordinate value yLcHeight/N, where N is a positive number. In the embodiment of the application, if N is 2, a line segment parallel to the abscissa axis is taken as an auxiliary line at the midpoint position on the ordinate axis, and the ordinate of each point on the auxiliary line is chight/2.
The third position information is (x)n’,yn') the third designated coordinate value is yn', the first difference value is y'n-yLAnd the trigonometric function value of the included angle is cos (2. pi./360. angle), whereinAnd angle is the radian value of the included angle.
Y 'if the first positional relationship is located before the auxiliary line in an oblique direction, i.e., the third designated coordinate value is greater than the reference coordinate value'n-yL|=y′n-yLThen the first offset value is (y)n’-yL) Cos (2 x pi/360 x angle), the first coordinate value is the sum of the third designated coordinate value and the first offset value, namely the first coordinate value: y isuser=yn’+(yn’-yL)*cos(2*π/360*angle)。
Y 'if the first positional relationship is located behind the auxiliary line in an oblique direction, i.e., the third designated coordinate value is smaller than the reference coordinate value'n-yL|=yL-y′nThen the first offset value is (y)L-yn') cos (2 x pi/360 x angle), the first coordinate value being the difference between the third designated coordinate value and the first offset value, i.e. the first coordinate value: y isuser=yn’-(yL-yn’)*cos(2*π/360*angle)。
And taking another coordinate value of the third position information other than the third designated coordinate value as the second coordinate value, specifically, if the third designated coordinate value is an abscissa value of the third position information, the second coordinate value is an ordinate value of the third position information, and if the third designated coordinate value is an ordinate value of the third position information, the second coordinate value is an abscissa value of the third position information. In the embodiment of the present application, the third designated coordinate value is yn', the second coordinate value is xnIf the first coordinate value and the second coordinate value are used as the user position information, the user position information is a coordinate (x)n’,yuser)。
In addition, an embodiment of determining the target position information corresponding to the fourth position information based on the included angle and the second position relationship may be: acquiring an absolute value of a difference value between the fourth designated coordinate value and the reference coordinate value, and recording the absolute value as a second difference value; taking the product of the second difference value and the trigonometric function value of the included angle as a second offset value; if the second positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the fourth designated coordinate value and the second offset value as a third coordinate value; if the second positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the fourth designated coordinate value and the second offset value as a third coordinate value; setting another coordinate value other than a fourth specified coordinate value of the fourth position information as a fourth coordinate value; and taking the third coordinate value and the fourth coordinate value as the target position information.
Specifically, referring to the above embodiment for determining the user location information, if the fourth location information is (xm ', ym'), the fourth designated coordinate is ym ', and the second difference is | y'm-yLY 'if the second positional relationship is located before the auxiliary line in the tilt direction, i.e., the fourth designated coordinate value is greater than the reference coordinate value'm-yL|=y′m-yLThen the second offset value is (y)m’-yL) Cos (2 x pi/360 x angle), and the third coordinate value is the sum of the fourth designated coordinate value and the second offset value, that is, the third coordinate value: y isaim=ym’+(ym’-yL) Cos (2 x pi/360 x angle), y 'if the second positional relationship is located behind the auxiliary line in the oblique direction, i.e., the fourth designated coordinate value is smaller than the reference coordinate value'm-yL|=yL-y'mThen the second offset value is (y)L-ym') cos (2 x pi/360 x angle), and the third coordinate value is the difference between the fourth designated coordinate value and the second offset value, i.e. the third coordinate value: y isaim=ym’-(yL-ym’)*cos(2*π/360*angle)。
The other coordinate value than the fourth designated coordinate value of the fourth position information is used as the fourth coordinate value, specifically, if the fourth designated coordinate value is the abscissa value of the fourth position information, the fourth coordinate value is the ordinate value of the fourth position information, and if the fourth designated coordinate value is the ordinate value of the fourth position information, the fourth coordinate value is the abscissa value of the fourth position information. In the embodiment of the present application, the fourth designated coordinate value is ym', the second coordinate value is xmIf the third coordinate value and the fourth coordinate value are set as the target position information, the user position information is set as coordinates (x)m’,yaim)。
Therefore, the webpage application program can determine the user position information and the target position information in the custom map based on the method under the condition of not calling map software.
S350: and adding first mark content and second mark content in the custom map based on the user position information and the target position information.
S360: and displaying the customized map added with the first mark content and the second mark content in a specified interface.
Therefore, the webpage application program can determine the user position information and the target position information in the customized map based on the method under the condition that the map software is not called, and can adjust the position relation of the user and the target in the customized map according to the included angle between the customized map and the plane of the map coordinate system.
Referring to fig. 9, fig. 9 illustrates a content display method, which is applied to the web application, but may also be applied to a web page of a browser or other application software, which is not limited herein. Specifically, the method comprises the following steps: s910 to S950.
S910: first position information of a user position and second position information of a target position are acquired.
S920: based on a preset scale of a user-defined map and an included angle between a plane of the user-defined map and a plane of the world plane coordinate system, obtaining user position information corresponding to the first position information and target position information corresponding to the second position information,
s930: and adding first mark content and second mark content in the custom map based on the user position information and the target position information.
S940: adding a route in the custom map based on the user location information and the target location information.
The route is used for indicating information such as the distance between the user position and the target position and the direction, and the starting point and the ending point of the route can be indicated to the user as the user position and the target position through the reminding of the route. In some embodiments, the route is a line segment connecting the user location information and the target location information, and the shape of the line segment may be a curve or a straight line.
As an embodiment, the route may be a route determined according to a traffic route between the user location and the target location in the world coordinate system, specifically, a plurality of location points on the traffic route may be obtained, a coordinate point of each location point in the custom map is determined by the above method, and the plurality of coordinate points are fitted to the route.
As an embodiment, it is also possible to determine a reference point between the user position and the target position, and determine the route based on these three position points. Specifically, referring to fig. 10, S940 includes: s941 to S943.
S941: a determined reference point between the user location information and the target location information in the map coordinate system.
As an embodiment, the reference point between the user position and the target position may be determined according to the orientation relationship therebetween. Specifically, the abscissa axis of the map coordinate system is the longitude direction, and the ordinate axis is the latitude direction, that is, the abscissa axis is the east-west direction, the ordinate axis is the north-south direction, and the layout of the map coordinate system is the north-up, the south-down, the south-left, the west-right, and the east-west direction, the azimuth information of the target position relative to the user position can be determined according to the user position information and the target position information in the map coordinate system, the azimuth information includes an azimuth angle, and specifically, the coordinate value of the user position information and the coordinate value of the target position information are used to determine the direction vector between the user position information and the target position information.
As an embodiment, the arrow direction of the direction vector may be the user location information towards the target location information. Determining a first deflection angle of the direction vector and an abscissa axis and a second deflection angle of the direction vector and an ordinate axis, if the angular relationship between the first deflection angle and the second deflection angle meets a preset condition, indicating that the target position information is closer to the position of the true south or the true north of the user position information, determining a reference point by adopting a first mode, and if the angular relationship does not meet the preset condition, indicating that the target position information is closer to the position of the true east or the true west of the user position information, determining the reference point by adopting a second mode.
The first method is to use an intermediate value between the abscissa of the user position information and the abscissa of the target position information as the abscissa of the reference point, and use the ordinate of the specified position point, which is farther from the user position information than the intermediate value, as the ordinate of the reference point, wherein the intermediate value is an intermediate value between the ordinate of the user position information and the ordinate of the target position information, and specifically, use a numerical value between the ordinate of the target position and the ordinate of the intermediate value as the ordinate of the reference point. A first mode is to use an intermediate value between the ordinate of the user position information and the ordinate of the target position information as the ordinate of the reference point, and use the abscissa of the reference point, which is a specified position point farther from the user position information than the intermediate value is, as the abscissa, wherein the intermediate value is an intermediate value between the abscissa of the user position information and the abscissa of the target position information, and specifically, use a numerical value between the abscissa of the target position and the abscissa of the intermediate value as the abscissa of the reference point.
As an embodiment, an embodiment of determining whether the angular relationship between the first yaw angle and the second yaw angle satisfies a preset condition may be that if the first yaw angle is greater than the second yaw angle, it is determined that the angular relationship between the first yaw angle and the second yaw angle satisfies the preset condition, and if the first yaw angle is smaller than the second yaw angle, it is determined that the angular relationship between the first yaw angle and the second yaw angle does not satisfy the preset condition. In addition, if the first deflection angle is equal to the first deflection angle, any of the first manner or the second manner described above may be employed.
As another embodiment, an embodiment of determining whether the angular relationship between the first deflection angle and the second deflection angle satisfies the preset condition may be that if the first deflection angle is greater than the second deflection angle, and a difference between the first deflection angle and the second deflection angle is greater than a specified value, it is determined that the angular relationship between the first deflection angle and the second deflection angle satisfies the preset condition, and if the first deflection angle is smaller than the second deflection angle, and a difference between the first deflection angle and the second deflection angle is greater than the specified value, it is determined that the angular relationship between the first deflection angle and the second deflection angle satisfies the preset condition. In contrast, in the case where the first deflection angle is equal to the first deflection angle and the difference between the first deflection angle and the second deflection angle is smaller than a predetermined value, either the first aspect or the second aspect may be adopted. As shown in fig. 11, a direction vector 1103, a reference point 1104 between the user position 1101 and the target position 1102 in fig. 11 is not on the direction vector 1103, but is above an intermediate value between the ordinate of the user position 1101 and the ordinate of the target position 1102.
As an embodiment, assuming that the coordinates of the user location information are (x1, y1), the coordinates of the target location information are (x2, y2), assuming that the origin (0,0) is at the upper left in the map coordinate system of the custom map, assuming that the coordinates of the reference point are (x0, y0), if x1< x2, x0 ═ x1+ (x2-x1)/2, otherwise, x0 ═ x2+ (x1-x 2)/2. If y1> y2 and y1-y2> cHeight/M, then y0 is y2- (y1-y2), if y2> y1 and y2-y1> cHeight/M, y0 is y1- (y2-y1), if y1-y2| < cHeight/M, then y0 is (y2> y1y1: y2) -cHeight/M, i.e. if y2> y1, then y0 is y1-cHeight/M, if y2 is not greater than y1, then y0 is y 2-cHeight/M. Where M is a predetermined value, whether two points can be regarded as collinear points can be determined by whether the absolute value of the difference between y1 and y2 is greater than ceheight/M. Specifically, M may be 10, or may be other values, which are not limited herein.
S942: setting a curve based on the user position information, the target position information, and the reference point, the curve being the route.
As an implementation manner, curve fitting may be performed on the coordinate point corresponding to the user location information, the coordinate point corresponding to the target location information, and the reference point, and an obtained curve may be used as the route. Specifically, the above three points may be fitted into a curve in a manner of a bezier curve or the like, as the route.
S943: adding the curve into the custom map.
As shown in fig. 12, a first markup content 1201, a second markup content 1202, and a curve 1203 are displayed in the interface of the custom map. In addition, the route is displayed in the custom map in the form of a curve, so that not only can the route be prevented from being overlapped or mixed with other line segments in the custom map, but also a plurality of routes can be more conveniently distinguished in the form of the curve when being displayed, for example, the farther the distance is, the higher the radian of the curve is, namely, the higher the vertex position of the curve is.
In addition, the mark content corresponding to the location point may include a pattern for indicating the location of the location point in the custom map and text content for describing the location point, for example, "my location" in fig. 12 is used for indicating that the location point is the location of the user, and "XX city" is used for indicating the place name of the location point.
In addition to the first markup content 1201, the second markup content 1202 and the curve 1203, other markup content may be displayed in the custom map for marking information other than the user position and the target position and the route, such as a river and other cities in fig. 12.
S950: and displaying the customized map added with the first mark content, the second mark content and the route in a specified interface.
Therefore, through the setting of the reference point, a route between the user position and the target position can be displayed in the custom map, and the route can have the function of indicating the position and the distance between the user position and the target position.
Referring to fig. 13, fig. 13 illustrates a content display method, which is applied to the web application, but may also be applied to a web page of a browser or other application software, which is not limited herein, where the web application may be an application capable of displaying a map interface, such as a gourmet web application, a social web application, a taxi-type web application, and a game-type web application. In the embodiment of the present application, the web application is a game-type web application, but it should be noted that the present application is not limited to the case where the web application is only a game-type web application, and certainly, the present application may also be other types of web applications, and the method of the present application is described by taking a game-type web application as an example. Specifically, the method comprises the following steps: s1301 to S1305.
S1301: and if the user is detected to trigger the display request of the self-defined map, displaying inquiry information.
The inquiry information is used for inquiring whether the user authorizes to obtain the position information of the user.
In one embodiment, the determination that the display request is obtained may be made when the web application is started. Specifically, it may be determined that the display request is acquired when it is detected that a preset interface of the web application is displayed. In this embodiment, the preset interface is the aforementioned designated interface, and the designated interface is a login interface or a home page of a web application.
In another embodiment, a display button is displayed in the preset interface of the web application, and the user can input a display request by triggering the display button. As shown in fig. 14, the interface shown in fig. 14 may be the aforementioned preset interface, and a display button 1401 is displayed in the interface shown in fig. 14, and a specified content is displayed in the display button 1401, and the specified content is used for representing the function of the display button 1401, for example, the specific content of "displaying XXX" may be "displaying a custom map" or "following me", and the like, and the specific content may be set according to actual use. After the user clicks the display button 1401, the web application can detect a user-triggered display request for a custom map within the web application.
And then, when detecting that the user triggers a display request of the self-defined map in the webpage application program, displaying inquiry information to inquire whether the user authorizes the webpage application program to acquire the position information of the user. As an embodiment, the query information may be displayed in the preset interface, specifically, may be displayed in a pop-up window form, may be displayed in a top status bar form, and may also be displayed in a voice or video form, which is not limited herein.
As shown in fig. 15, in a designation window 1501, inquiry information including: inquiry contents for displaying specified contents for inquiring whether the user authorizes acquisition of the user's location information, such as "request acquisition of your location information" shown in fig. 15, and inquiry buttons including a confirm button 1502 and a reject button 1503. The confirm button 1502 is clicked (i.e., allowed in fig. 15) to input a confirm instruction if the user allows the web application to acquire the user's location information, and the reject button 1503 is clicked (i.e., rejected in fig. 15) to input a reject instruction if the user does not allow the web application to acquire the user's location information.
In one embodiment, the user can enter a confirmation command by clicking the confirmation button 1502. As another embodiment, when it is detected that the user touches the confirmation button 1502, the duration of the user continuously touching the confirmation button 1502 this time may be obtained, an allowed time period may be determined based on the time length, query information may not be displayed in the allowed time period, and when a confirmation instruction input by the user based on the query information is not received, the first location information of the location of the user and the second location information of the target location may be obtained based on a positioning algorithm preset by the web application, and a subsequent method may be executed, and the web application is allowed to obtain the location information of the user by default in the allowed time period. Wherein the allowable period is determined according to the duration, the longer the allowable period. In one embodiment, the time starting point of the permission period is a time point when the display request is acquired next time, and the current time may be the time starting point. The allowed period may be the product of the duration and a first specified constant, e.g., the specified constant may be a positive integer, e.g., the specified constant is 10, then the allowed period is a multiple of the first specified constant of the duration.
Similarly, a rejection period is also provided, and the obtaining manner of the rejection period may refer to the obtaining manner of the allowable duration, specifically, the rejection period may be a product of the duration and a second specified constant, where the duration of the time is the duration of the continuous touch on the rejection button 1503, and the second specified constant may be the same as the first specified constant or larger than the first specified constant.
S1302: and if a confirmation instruction input by the user based on the inquiry information is received, acquiring first position information of the user position and second position information of the target position.
S1303: and acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located.
S1304: and adding first mark content and second mark content in the custom map based on the user position information and the target position information.
S1305: and displaying the customized map added with the first mark content and the second mark content in a specified interface.
As an embodiment, the designated interface may be the aforementioned preset interface, that is, the interface for the user to input the display request and input the confirmation instruction and the interface for displaying the customized map are both the designated interface. As an embodiment, the customized map may be displayed in a pop-up window manner in the designated interface, as shown in fig. 16, the customized map 1601 displays the first markup content, the second markup content and the route. In some embodiments, distance prompt information indicating the distance between the user's location and the target location may also be displayed on the custom map 1601. And the head portrait of the user is displayed at the corresponding position of the distance prompt information.
Referring to fig. 17, a block diagram of a content display device according to an embodiment of the present disclosure is shown, where the device may include: an acquisition unit 1701, a determination unit 1702, an addition unit 1703, and a display unit 1704.
The acquiring unit 1701 is configured to acquire first position information of a user position and second position information of a target position, where the first position information and the second position information are coordinate points in a world plane coordinate system.
Further, the obtaining unit 1701 is further configured to obtain a first longitude and latitude of the user location and a second longitude and latitude of the target location; determining a latitude and longitude area range based on the designated position area corresponding to the self-defined map; and determining first position information of the first longitude and latitude in the world plane coordinate system and second position information of the second longitude and latitude in the world plane coordinate system, wherein the world plane coordinate system is a plane coordinate system corresponding to the longitude and latitude area range.
Further, the obtaining unit 1701 is further configured to obtain first location information of a location of the user and second location information of the target location if it is detected that the user triggers a display request of the custom map.
Further, the obtaining unit 1701 is further configured to, if it is detected that the user triggers a display request of the custom map, display query information, where the query information is used to query whether the user authorizes obtaining of the location information of the user; and if a confirmation instruction input by the user based on the inquiry information is received, acquiring first position information of the user position and second position information of the target position.
A determining unit 1702, configured to obtain, based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located, user position information corresponding to the first position information and target position information corresponding to the second position information, where the user position information and the target position information are both located in a map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the user-defined map.
Further, the determining unit 1702 is further configured to determine, based on the scale of the custom map, third location information corresponding to the first location information and fourth location information corresponding to the second location information in the map coordinate system; acquiring an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located; and determining user position information corresponding to the third position information and target position information corresponding to the fourth position information based on the included angle.
Further, the determining unit 1702 is further configured to determine an auxiliary line set in the map coordinate system in advance; acquiring a first position relation between the third position information and the auxiliary line and a second position relation between the fourth position information and the auxiliary line; and determining user position information corresponding to the third position information based on the included angle and the first position relation, and determining target position information corresponding to the fourth position information based on the included angle and the second position relation.
Further, the determining unit 1702 is further configured to determine an inclination direction of a plane where the custom map is located relative to a plane where the world plane coordinate system is located, where the inclination direction is an abscissa axis direction or an ordinate axis direction; and determining the first position relationship according to a third designated coordinate value of the third position information and a reference coordinate value of the auxiliary line, and determining the second position relationship according to a fourth designated coordinate value of the fourth position information and the reference coordinate value of the auxiliary line, wherein the position relationships comprise a position before the auxiliary line in the tilting direction and a position after the auxiliary line in the tilting direction, and the reference coordinate value, the third designated coordinate value and the fourth designated coordinate value are numerical values on a coordinate axis corresponding to the tilting direction.
Further, the determining unit 1702 is further configured to determine to obtain an absolute value of a difference between the third specified coordinate value and the reference coordinate value, which is denoted as a first difference; taking the product of the first difference value and the trigonometric function value of the included angle as a first offset value; if the first positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the third designated coordinate value and the first offset value as a first coordinate value; if the first positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the third designated coordinate value and the first offset value as a first coordinate value; setting another coordinate value other than a third designated coordinate value of the third position information as a second coordinate value; and taking the first coordinate value and the second coordinate value as the user position information.
Further, the determining unit 1702 is further configured to obtain an absolute value of a difference between the fourth specified coordinate value and the reference coordinate value, which is denoted as a second difference; taking the product of the second difference value and the trigonometric function value of the included angle as a second offset value; if the second positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the fourth designated coordinate value and the second offset value as a third coordinate value; if the second positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the fourth designated coordinate value and the second offset value as a third coordinate value; setting another coordinate value other than a fourth specified coordinate value of the fourth position information as a fourth coordinate value; and taking the third coordinate value and the fourth coordinate value as the target position information.
An adding unit 1703, configured to add, in the customized map, first tag content and second tag content based on the user location information and the target location information, where the first tag content is used to tag the user location in the customized map, and the second tag content is used to tag the target location in the customized map.
Further, the adding unit 1703 is further configured to add a route in the custom map based on the user location information and the target location information; and displaying the customized map added with the first mark content, the second mark content and the route in a specified interface.
Further, the adding unit 1703 is also used for determining a reference point between the user position information and the target position information in the map coordinate system; setting a curve based on the user position information, the target position information, and the reference point, the curve being the route; adding the curve into the custom map.
A display unit 1704, configured to display the customized map added with the first markup content and the second markup content in a designated interface.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 18, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
Referring to fig. 19, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 1900 has stored therein program code that can be called by a processor to execute the methods described in the above-described method embodiments.
The computer-readable storage medium 1900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer-readable storage medium 1900 includes a non-volatile computer-readable medium. The computer-readable storage medium 1900 has storage space for program code 1910 that performs any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 1910 may be compressed, for example, in a suitable form.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data storage method.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. A method for displaying content, the method comprising:
acquiring first position information of a user position and second position information of a target position, wherein the first position information and the second position information are coordinate points in a world plane coordinate system;
acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane of the user-defined map and a plane of a world plane coordinate system, wherein the user position information and the target position information are both located in the map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the user-defined map;
adding first marking content and second marking content in the custom map based on the user position information and target position information, wherein the first marking content is used for marking the user position in the custom map, and the second marking content is used for marking the target position in the custom map;
and displaying the customized map added with the first mark content and the second mark content in a specified interface.
2. The method of claim 1, wherein the obtaining the first location information of the user location and the second location information of the target location comprises:
acquiring a first longitude and latitude of the user position and a second longitude and latitude of the target position;
determining a latitude and longitude area range based on the designated position area corresponding to the self-defined map;
and determining first position information of the first longitude and latitude in the world plane coordinate system and second position information of the second longitude and latitude in the world plane coordinate system, wherein the world plane coordinate system is a plane coordinate system corresponding to the longitude and latitude area range.
3. The method according to claim 1, wherein the obtaining of the user location information corresponding to the first location information and the target location information corresponding to the second location information based on a preset scale of the custom map and an included angle between a plane of the custom map and a plane of the world plane coordinate system comprises:
determining third position information corresponding to the first position information and fourth position information corresponding to the second position information in the map coordinate system based on the scale of the self-defined map;
acquiring an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located;
and determining user position information corresponding to the third position information and target position information corresponding to the fourth position information based on the included angle.
4. The method of claim 3, wherein the determining the user location information corresponding to the third location information and the target location information corresponding to the fourth location information based on the included angle comprises:
determining an auxiliary line which is set in the map coordinate system in advance;
acquiring a first position relation between the third position information and the auxiliary line and a second position relation between the fourth position information and the auxiliary line;
and determining user position information corresponding to the third position information based on the included angle and the first position relation, and determining target position information corresponding to the fourth position information based on the included angle and the second position relation.
5. The method according to claim 4, wherein the abscissa axes of the world plane coordinate system and the map coordinate system are both longitudinal directions, and the ordinate axes are both latitudinal directions, and wherein the obtaining of the first positional relationship of the third positional information and the auxiliary line and the second positional relationship of the fourth positional information and the auxiliary line:
determining the inclination direction of the plane of the user-defined map relative to the plane of the world plane coordinate system, wherein the inclination direction is the direction of an abscissa axis or the direction of an ordinate axis;
and determining the first position relationship according to a third designated coordinate value of the third position information and a reference coordinate value of the auxiliary line, and determining the second position relationship according to a fourth designated coordinate value of the fourth position information and the reference coordinate value of the auxiliary line, wherein the position relationships comprise a position before the auxiliary line in the tilting direction and a position after the auxiliary line in the tilting direction, and the reference coordinate value, the third designated coordinate value and the fourth designated coordinate value are numerical values on a coordinate axis corresponding to the tilting direction.
6. The method according to claim 5, wherein the determining the user location information corresponding to the third location information based on the included angle and the first location relationship comprises:
acquiring an absolute value of a difference value between the third designated coordinate value and the reference coordinate value, and recording the absolute value as a first difference value;
taking the product of the first difference value and the trigonometric function value of the included angle as a first offset value;
if the first positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the third designated coordinate value and the first offset value as a first coordinate value;
if the first positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the third designated coordinate value and the first offset value as a first coordinate value;
setting another coordinate value other than a third designated coordinate value of the third position information as a second coordinate value;
and taking the first coordinate value and the second coordinate value as the user position information.
7. The method according to claim 5, wherein the determining the target position information corresponding to the fourth position information based on the included angle and the second position relationship comprises:
acquiring an absolute value of a difference value between the fourth designated coordinate value and the reference coordinate value, and recording the absolute value as a second difference value;
taking the product of the second difference value and the trigonometric function value of the included angle as a second offset value;
if the second positional relationship is located before the auxiliary line in the tilt direction, acquiring the sum of the fourth designated coordinate value and the second offset value as a third coordinate value;
if the second positional relationship is located behind the auxiliary line in the tilt direction, acquiring a difference between the fourth designated coordinate value and the second offset value as a third coordinate value;
setting another coordinate value other than a fourth specified coordinate value of the fourth position information as a fourth coordinate value;
and taking the third coordinate value and the fourth coordinate value as the target position information.
8. The method according to claim 1, wherein the displaying the customized map added with the first markup content and the second markup content in a designated interface comprises:
adding a route in the custom map based on the user location information and the target location information;
displaying the customized map added with the first mark content, the second mark content and the route in the designated interface.
9. The method of claim 8, wherein the adding a route within the custom map based on the user location information and the target location information comprises:
determining a reference point between the user location information and the target location information in the map coordinate system;
setting a curve based on the user position information, the target position information, and the reference point, the curve being the route;
adding the curve into the custom map.
10. The method according to claim 9, wherein the abscissa of the reference point is an intermediate value between the abscissa of the user location information and the abscissa of the target location information, and the ordinate value of the reference point is farther from the user location information than the intermediate value, and the intermediate value is an intermediate value between the ordinate of the user location information and the ordinate of the target location information.
11. The method according to any one of claims 1 to 10, wherein the acquiring first location information of the user location and second location information of the target location comprises:
and if the fact that the user triggers a display request of the custom map is detected, acquiring first position information of the user position and second position information of the target position.
12. The method of claim 11, wherein obtaining the first location information of the user location and the second location information of the target location if it is detected that the user triggers the display request of the custom map comprises:
if the fact that the user triggers a display request of a custom map is detected, query information is displayed, and the query information is used for querying whether the user authorizes to obtain the position information of the user;
and if a confirmation instruction input by the user based on the inquiry information is received, acquiring first position information of the user position and second position information of the target position.
13. A content display apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring first position information of a user position and second position information of a target position, and the first position information and the second position information are coordinate points in a world plane coordinate system;
the determining unit is used for acquiring user position information corresponding to the first position information and target position information corresponding to the second position information based on a preset scale of a user-defined map and an included angle between a plane where the user-defined map is located and a plane where the world plane coordinate system is located, wherein the user position information and the target position information are both located in a map coordinate system, and the map coordinate system is a plane coordinate system corresponding to the user-defined map;
the adding unit is used for adding first mark content and second mark content in the custom map based on the user position information and the target position information, wherein the first mark content is used for marking the user position in the custom map, and the second mark content is used for marking the target position in the custom map;
and the display unit is used for displaying the customized map added with the first mark content and the second mark content in a specified interface.
14. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-12.
15. A computer-readable medium, characterized in that the readable medium stores program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1-12 when executed by the processor.
CN202110037213.1A 2021-01-12 2021-01-12 Content display method, device, electronic equipment and computer readable medium Active CN112699324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110037213.1A CN112699324B (en) 2021-01-12 2021-01-12 Content display method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110037213.1A CN112699324B (en) 2021-01-12 2021-01-12 Content display method, device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112699324A true CN112699324A (en) 2021-04-23
CN112699324B CN112699324B (en) 2023-11-14

Family

ID=75514129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110037213.1A Active CN112699324B (en) 2021-01-12 2021-01-12 Content display method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112699324B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048698B (en) * 2022-12-30 2023-06-30 以萨技术股份有限公司 Method for displaying popup window in map, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140351689A1 (en) * 2012-02-28 2014-11-27 Uc Mobile Limited Methods and systems for displaying webpage content
CN110928627A (en) * 2019-11-22 2020-03-27 北京市商汤科技开发有限公司 Interface display method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140351689A1 (en) * 2012-02-28 2014-11-27 Uc Mobile Limited Methods and systems for displaying webpage content
CN110928627A (en) * 2019-11-22 2020-03-27 北京市商汤科技开发有限公司 Interface display method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116048698B (en) * 2022-12-30 2023-06-30 以萨技术股份有限公司 Method for displaying popup window in map, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112699324B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
US9916673B2 (en) Method and apparatus for rendering a perspective view of objects and content related thereto for location-based services on mobile device
US9661468B2 (en) System and method for converting gestures into digital graffiti
US9122382B2 (en) Method for selecting target at touch point on touch screen of mobile device
EP2194508B1 (en) Techniques for manipulating panoramas
US9361283B2 (en) Method and system for projecting text onto surfaces in geographic imagery
US9069440B2 (en) Method, system and apparatus for providing a three-dimensional transition animation for a map view change
CN108509239A (en) Figure layer display methods, device, electronic equipment and storage medium
US20150062114A1 (en) Displaying textual information related to geolocated images
US20140365114A1 (en) Providing Maneuver Indicators on a Map
JP2004272217A (en) Map image display controlling method, its program, storage medium for storing the program and electronic equipment
JP2012168646A (en) Information processing apparatus, information sharing method, program, and terminal device
US9928305B2 (en) Method and apparatus of physically moving a portable unit to view composite webpages of different websites
US10094681B2 (en) Controlling a map system to display off-screen points of interest
KR20120095247A (en) Mobile apparatus and method for displaying information
CN110174114B (en) Lane line-level path generation method and device and storage medium
JP2008070705A (en) Picture providing system and picture providing server device
CN112699324B (en) Content display method, device, electronic equipment and computer readable medium
Ranasinghe et al. Pedestrian navigation and GPS deteriorations: User behavior and adaptation strategies
JP5705793B2 (en) Augmented reality display device, augmented reality display system, augmented reality display method, and augmented reality display program
JP5800386B2 (en) Map display device, map display method, and program
JP4884458B2 (en) Map display apparatus and method for displaying area with comparison object
JP2018036681A (en) Map preparation device, map preparation method, and map preparation program
JP2019045958A (en) Spot information display system
KR20240020742A (en) Method and device for displaying real estate information with actual imaged map
JP2009133960A (en) Map community system, server device, terminal unit, terminal unit processing method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40042022

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant