CN109036096B - Method and device for controlling interpolation points along map line - Google Patents

Method and device for controlling interpolation points along map line Download PDF

Info

Publication number
CN109036096B
CN109036096B CN201710427255.XA CN201710427255A CN109036096B CN 109036096 B CN109036096 B CN 109036096B CN 201710427255 A CN201710427255 A CN 201710427255A CN 109036096 B CN109036096 B CN 109036096B
Authority
CN
China
Prior art keywords
point
target
line
scale
points
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.)
Active
Application number
CN201710427255.XA
Other languages
Chinese (zh)
Other versions
CN109036096A (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 CN201710427255.XA priority Critical patent/CN109036096B/en
Publication of CN109036096A publication Critical patent/CN109036096A/en
Application granted granted Critical
Publication of CN109036096B publication Critical patent/CN109036096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/006Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes
    • G09B29/007Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes using computer methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Ecology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • Instructional Devices (AREA)

Abstract

The invention provides a method and a device for controlling interpolation points along a map, wherein the method comprises the following steps: loading a display map, and acquiring a current target scale of the map; determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting a corresponding virtual object based on the target insertion point. Because the insertion points are screened from the preset insertion points displayed under the maximum scale and serve as target insertion points to be displayed under other different scales, the positions of the insertion points under all scales can be determined only by calculating the positions of the insertion points under the maximum scale in the embodiment of the invention, and therefore, the position calculation amount of the insertion points along the line is reduced.

Description

Method and device for controlling interpolation points along map line
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for controlling interpolation points along a map.
Background
In electronic maps, especially in game maps or in LBS (Location Based Services) applications, there is a need to arrange more and more objects along a route, such as a Marker for closing a road, a roadside treelet, a telephone booth, a car, etc. The common practice is: and calculating the position of the along-line inserted point under each scale according to the length of the line and the size of the scale of the currently displayed map, and then inserting a corresponding virtual object at the position of the along-line inserted point. Because the positions of the insertion points along the line need to be calculated under each scale, the calculation amount is large.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling interpolation points along a map, which aim to solve the problem of large calculation amount of positions of interpolation points along a map.
In a first aspect, an embodiment of the present invention provides a method for controlling a map along a line insertion point, including:
loading a display map, and acquiring a current target scale of the map;
determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map;
inserting the corresponding virtual object based on the target insertion point.
In a second aspect, an embodiment of the present invention further provides a map along-line point-of-insertion control apparatus, including:
the acquisition module is used for loading a display map and acquiring the current target scale of the map;
the target insertion point determining module is used for determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map;
and the object inserting module is used for inserting the corresponding virtual object based on the target insertion point.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein the programs, when executed, implement the steps in the map along-line interpolation control method described above.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps in the method for controlling along-line interpolation points of a map.
Thus, in the embodiment of the invention, the display map is loaded, and the current target scale of the map is obtained; determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting a corresponding virtual object based on the target insertion point. Because the insertion points are screened from the preset insertion points displayed under the maximum scale and serve as target insertion points to be displayed under other different scales, the positions of the insertion points under all scales can be determined only by calculating the positions of the insertion points under the maximum scale in the embodiment of the invention, and therefore, the position calculation amount of the insertion points along the line is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of a method for controlling a map along a line of intersection according to an embodiment of the present invention;
fig. 2 is a distribution state diagram of insertion points of a part of target insertion lines under the maximum scale in the map along-line insertion point control method according to an embodiment of the present invention;
fig. 3 is a distribution state diagram of insertion points of a part of target insertion lines on a next scale of the maximum scale in the map along-line insertion point control method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method for controlling points along a map according to another embodiment of the present invention;
FIG. 5 is a block diagram of a map along a line intersection control device according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a method for controlling a map along a line of interpolation, where as shown in fig. 1, the method for controlling the map along the line of interpolation includes:
step 101, loading a display map and obtaining a current target scale of the map.
The method for controlling the along-line insertion points of the map, provided by the embodiment of the invention, is mainly applied to electronic maps, such as a high-grade map, an Tencent map, a Baidu map and the like, and is used for managing the positions of virtual objects displayed in the electronic map.
In this step, when the electronic map is opened or the scale of the electronic map is changed, the electronic map needs to be loaded and displayed again according to the currently displayed target scale. For example, when the user zooms in or out of the map, the map will be displayed at the current zoom scale. The scale of a typical map is set at a certain level, and the scale of one level is adjusted every time a user inputs a zoom-in or zoom-out instruction. For example, the scale of the map is 20 levels, wherein the maximum level is 20 th level, and the minimum level is 1 st level, wherein the 20 th level is the maximum scale, and the larger the scale is, the smaller the actual representation distance of the pixels on the screen is, and the more detailed the representation object is.
It should be understood that the scale jumps at adjacent levels in the normal case, and certainly when the zoom instruction input interval by the user is small, the jump of the scale level can be realized, or the jump of the scale level from the current scale level to the scale level input by the user can be realized by directly inputting the specified scale level.
And 102, determining a target inserting point to be displayed of the target inserting line according to the corresponding relation between the target scale and the inserting point of the target inserting line.
In this step, the correspondence includes: and taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map.
Specifically, the target insertion line may be one or more insertion lines, where the target insertion line is an insertion line preset by a user, and in the embodiment of the present invention, the line insertion point refers to a position point that is set at intervals along the target insertion line and used for inserting a virtual object. The point along the line on the insertion line is the preset insertion point. In all the preset insertion points arranged on the insertion line, the insertion points required to be displayed under different scales are different, and all the insertion points required to be displayed under each scale are target insertion points to be displayed under the scale.
The datum point may be any one of the predetermined insertion points, and in this embodiment, the datum point is preferably a midpoint of the target insertion line, and the midpoint is also a predetermined insertion point.
In the present embodiment, the above-mentioned screening interval is related to the magnification between two adjacent scales, and in the prior art, the magnification between two adjacent scales of the electronic map is usually set to be 2 times. In the following examples, the magnification between two adjacent scales is 2 times. Specifically, the index values of the points are sequentially arranged in the order of arrangement at all insertion points between the reference point and the head of the line (the insertion point closest to the reference point is 1), and the index values of the points are sequentially arranged in the order of arrangement at all insertion points between the reference point and the tail of the line (the insertion point closest to the reference point is 1). As shown in FIG. 2, only a portion of the target patch cord is shown in FIG. 2. The datum point is A, the positions and index values of all insertion points between the datum point and the head of the line form an independent insertion list A1, and the positions and index values of all insertion points between the datum point and the tail of the line form an independent insertion list A2. In the insertion list A1, the index of the insertion point includes 1, 2, 3, 4 … n, and in the insertion list A2, the index of the insertion point includes 1, 2, 3, 4 … n. The location of each insertion point may include a latitude and longitude.
If the maximum scale level is Leve MAX The target scale is in Leve class. In the screening, the reference points are the necessary points, and the insertion points screened from the insertion list A1 and the insertion list A2 are: leve with index value of 2 MAX -points of integer multiples of the Leve power. As shown in FIG. 3, only a portion of the target patch cord is shown in FIG. 3. FIGS. 2 and 3 show the arrangement of the insertion points of two adjacent scales, and the scale level of the map corresponding to FIG. 2 is Leve MAX The scale of the map of FIG. 3 is in Leve MAX-1 . After the preset insertion point of the maximum scale is obtained through calculation in the above mode, the insertion points of other scales with different levels can be obtained through screening.
In this embodiment, since the insertion points are screened from the preset insertion points displayed at the maximum scale as target insertion points to be displayed at different scales, the positions of the insertion points can be calculated only once, and therefore the calculation amount of the positions of the insertion points along the line can be reduced. The screening rules corresponding to different scales may be set according to actual needs, which is described in detail in the following embodiments.
Step 103, inserting the corresponding virtual object based on the target insertion point.
In this step, the virtual objects placed at each insertion point may be the same or different, and for an insertion point, one virtual object is usually placed, but certainly, similar virtual objects of the same type may also be placed to form an object cluster, and specifically, similar virtual objects of the same type may be placed within a certain radius range.
It should be understood that each virtual object has a certain object size, and the distance between the adjacent preset insertion points can be set according to the size of the virtual object, so as to ensure that the virtual object between the two adjacent insertion points cannot be covered. Of course, the attribute values of the running gland between virtual objects may also be set. In addition, since the head and tail of each target insertion line are mostly crossroads or other effect displays of users, usually according to scene settings, a certain distance is reserved between the head and tail of the line and no insertion point is placed, and the distance is smaller than the distance between two adjacent preset insertion points.
Thus, in the embodiment of the invention, the display map is loaded, and the current target scale of the map is obtained; determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting a corresponding virtual object based on the target insertion point. Because the insertion points are screened from the preset insertion points displayed under the maximum scale and serve as target insertion points to be displayed under other different scales, the positions of the insertion points under all scales can be determined only by calculating the positions of the insertion points under the maximum scale in the embodiment of the invention, and therefore, the position calculation amount of the insertion points along the line is reduced.
It should be noted that, the manner of determining the target insertion point to be displayed may be set according to actual needs, for example, in an embodiment, the target insertion point under each scale may be first stored, and then the corresponding target insertion point is determined according to the target scale; in another embodiment, the attribute of the preset insertion point may be set, and the scale required to be displayed by each preset insertion point is determined according to the attribute. This is explained in detail below:
for example, in an embodiment, after the insertion points corresponding to each scale of the target insertion line are determined by screening, the insertion points corresponding to the target insertion line on each scale are stored, and then in step 102, the target insertion points corresponding to the target scale, which are locally stored by the target insertion line, may be directly searched according to the corresponding relationship.
In another embodiment, the step 102 includes:
determining the display state of each preset insertion point under the target scale according to the corresponding relation;
setting the preset insertion point determined to be displayed as the target insertion point.
In this embodiment, an attribute may be set for each predetermined insertion point, i.e., a member may be added to the object at each predetermined insertion point. The member can be a Boolean type array, and the array comprises two elements of key and value, wherein the key represents a scale and the value represents whether to display or not. Similarly, the target insertion point corresponding to each scale can be determined by the screening rule in the above embodiment, and then the display state of each insertion point under each scale is determined, so as to form an array for storage. And when the target scale is acquired, determining the target insertion point according to the display state of each preset insertion point under the target scale. In this embodiment, the data of the preset insertion point is only required to be saved once, so that the storage space is saved.
Furthermore, the map comprises a plurality of levels of scales arranged in descending order, and the insertion points corresponding to the target insertion line on the next level scale of the map are subsets of the insertion points corresponding to the previous level scale.
Specifically, if the maximum scale level is Leve MAX The target scale is in Leve class. In the screening, the reference points are the necessary points, and the insertion points screened from the insertion list A1 and the insertion list A2 are: leve with index value of 2 MAX -points of integer multiples of the Leve power. That is to say, the insertion point of the next scale is the insertion point determined by the previous scale insertion point with the reference point as the starting point and the interval point. In the prior art, each scale level needs to be calculated, and due to the problems of accuracy loss and the like, the calculated positions under different scales are different, and when the scales are switched on a map, the position of an object jumps. However, in this embodiment, the insertion points corresponding to the next scale are a subset of the insertion points corresponding to the previous scale. Therefore, the points appearing once in the zooming process do not disappear, the display is uniform and reasonable, the points do not jump in the zooming process, and the points appearing in the zooming process do not jump, so the display effect of the electronic map in the zooming process is improved。
It should be understood that the determination manner for each preset insertion point on the target insertion line may be set according to actual needs, and in particular, referring to fig. 4, before the step 101, the method further includes:
104, receiving a target plug-in line input by a user;
step 105, determining a reference insertion point on the target insertion line;
and 106, determining the preset insertion points by taking the reference insertion points as starting points, wherein the preset insertion points comprise the reference insertion points, a plurality of first insertion points arranged according to a first interval of a first line positioned on one side of the reference insertion points in the target insertion line, and a plurality of second insertion points arranged according to a second interval of a second line positioned on the other side of the reference insertion points in the target insertion line.
In this embodiment, the reference insertion point, the plurality of first insertion points, and the plurality of second insertion points constitute the predetermined insertion point. The target insertion line may be a straight line, a curved line, a broken line, or the like. In general, the target insertion lines are arranged along the route of the road or river, and the following embodiments will be described in detail by taking the broken line as an example.
The user may directly input a plurality of coordinate points from which a target insert line is constructed. Meanwhile, the user can input an inserting line on the map through other platforms, then the platform generates a plurality of coordinate points according to the inserting line input by the user, and finally the generated coordinate points are used as target inserting lines input by the user. The two-dimensional coordinate system comprises end points at two ends and a plurality of inflection points in the middle, and a connecting line between any two adjacent coordinate points is a straight line (of course, a curve with a certain curvature can also be used).
Specifically, the reference insertion point may be one of a plurality of coordinate points, or may be one between two adjacent coordinate points. Preferably, in this embodiment, the reference insertion point is the midpoint of the target insertion line.
It should be understood that, in the present embodiment, the distance between the first pitch and the second pitch may be set according to actual requirements, and is not further limited herein, preferably, the first pitch is equal to the second pitch, that is, the plurality of preset insertion points set on the target insertion line are uniformly distributed. Of course, the density of the preset insertion points may be the same or different for different target insertion line settings.
Indexes are also provided for the plurality of coordinate points, and the manner of setting the first insertion point and the second insertion point will be described in detail below.
In this embodiment, the length of the target insertion line may be calculated by the total length of a multi-segment line formed by a plurality of coordinate points, and the position of the center point of the target insertion line is found first. Specifically, the calculation may be started from the head of the target patch cord, the length of each segment of cord formed by two adjacent coordinate points is sequentially calculated cumulatively according to the index of the coordinate points, and if the length from the currently calculated cumulatively calculated coordinate point to the head of the target patch cord is less than half the length of the target patch cord, the length from the next coordinate point to the head of the target patch cord is continuously calculated according to the index; if the length from the currently accumulated coordinate point to the head of the target insert line is equal to half of the length of the target insert line, determining the position of the currently calculated coordinate point as the position of the center point of the target insert line, and determining the position as a reference insert point; and if the length from the currently accumulatively calculated coordinate point to the head of the target insert line is greater than half the length of the target insert line, determining the position of the central point according to the difference between the accumulated length from the head of the target insert line to the last coordinate point and the half length of the head of the target insert line.
After determining the location of the center point, the center point may be set as a reference insertion point, and then the location of each insertion point is determined by calculation from the reference insertion point to the beginning and end of the line, respectively. Specifically, when the position of the first insertion point is calculated towards the end of the line, the index of the coordinate point closest to the reference insertion point can be searched, then whether the distance between the two is greater than the first distance or not is calculated, if so, an insertion point is determined according to the first distance, and then the determined insertion point is used as the reference insertion point to continue calculation; if the distance is equal to the first distance, determining the currently calculated coordinate point as an insertion point, and then continuously calculating by taking the determined insertion point as a reference insertion point; and if the distance is smaller than the first distance, calculating whether the distance accumulated from the next coordinate point to the reference inserting point is larger than the first distance. When the line head is calculated, if the distance between the line head and the reference insertion point determined by current calculation is smaller than or equal to the first distance, the first insertion point is not set any more.
It should be noted that the calculation method of the second insertion point is the same as the calculation method of the first insertion point, and is not described herein again.
It should be understood that, because there may be a plurality of target insertion lines on the electronic map, when some objects may generate gland when the lines are intersected closely, the whole may be avoided by using the quadtree, so as to improve the display effect.
Referring to fig. 5, the present invention also provides a map along-line insertion point control apparatus, including:
an obtaining module 501, configured to load a display map and obtain a current target scale of the map;
a target inserting point determining module 502, configured to determine a target inserting point of a target inserting line to be displayed according to a corresponding relationship between the target scale and an inserting point of the target inserting line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map;
an object insertion module 503, configured to insert a corresponding virtual object based on the target insertion point.
Optionally, the target insertion point determining module 502 is specifically configured to, according to the corresponding relationship, search for a target insertion point corresponding to the target scale, where the target insertion line is locally stored.
Optionally, the target insertion point determining module 502 includes:
the determining unit is used for determining the display state of each preset insertion point under the target scale according to the corresponding relation;
a setting unit for setting the preset insertion point determined to be displayed as the target insertion point.
Optionally, the map includes multiple scales arranged in descending order, and the insertion points corresponding to the target insertion line on the next scale of the map are a subset of the insertion points corresponding to the previous scale.
Optionally, the map along-line insertion point control device further includes:
the receiving module is used for receiving a target plug-in line input by a user;
the reference insertion point determining module is used for determining a reference insertion point on the target insertion line;
and the insertion point setting module is used for determining the preset insertion point by taking the reference insertion point as a starting point, wherein the preset insertion point comprises the reference insertion point, a plurality of first insertion points arranged according to a first interval of a first line positioned on one side of the reference insertion point in the target insertion line, and a plurality of second insertion points arranged according to a second interval of a second line positioned on the other side of the reference insertion point in the target insertion line.
Optionally, the reference insertion point is a midpoint of the target insertion line.
Optionally, each of the target insertion points is configured with one or more virtual objects.
Thus, in the embodiment of the invention, the display map is loaded, and the current target scale of the map is obtained; determining a target inserting point to be displayed of the target inserting line according to the corresponding relation between the target scale and the inserting point of the target inserting line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting a corresponding virtual object based on the target insertion point. Because the insertion points are screened from the preset insertion points displayed under the maximum scale and serve as target insertion points to be displayed under other different scales, the positions of the insertion points under all scales can be determined only by calculating the positions of the insertion points under the maximum scale in the embodiment of the invention, and therefore, the position calculation amount of the insertion points along the line is reduced.
Referring to fig. 6, fig. 6 is a structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device shown in fig. 6 includes: at least one processor 601, memory 602, at least one network interface 604, and a user interface 603. The various components in the electronic device are coupled together by a bus system 605. It is understood that the bus system 605 is used to enable connected communication between these components. The bus system 605 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 605 in FIG. 6.
The user interface 603 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, track ball, touch pad, or touch screen, etc.).
It will be appreciated that the memory 602 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of illustration, and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SD RAM, ddr SDRAM), enhanced Synchronous SD RAM (Enhanced SD RAM, SDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DRRAM). The memory 602 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 602 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 6021 and application programs 6022.
The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program 6022 includes various application programs such as a Media Player (Media Player), a Browser (Browser), and the like, and is used to implement various application services. A program implementing the method of an embodiment of the invention can be included in the application program 6022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 602, specifically, a program or an instruction stored in the application program 6022, the processor 601 is configured to: loading a display map, and acquiring a current target scale of the map; determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting the corresponding virtual object based on the target insertion point.
Optionally, the processor 601 is further configured to: and searching a target insertion point corresponding to the target scale, which is locally stored by the target insertion line, according to the corresponding relation.
Optionally, the processor 601 is further configured to: determining the display state of each preset insertion point under the target scale according to the corresponding relation; setting the preset insertion point determined to be displayed as the target insertion point.
Optionally, the map includes multiple scales arranged in descending order, and the insertion points corresponding to the target insertion line on the next scale of the map are a subset of the insertion points corresponding to the previous scale.
Optionally, the processor 601 is further configured to: receiving a target plug-in line input by a user; determining a reference insertion point on the target insertion line; determining the preset insertion point by taking the reference insertion point as a starting point, wherein the preset insertion point comprises the reference insertion point, a plurality of first insertion points arranged according to a first interval of a first line positioned on one side of the reference insertion point in the target insertion line, and a plurality of second insertion points arranged according to a second interval of a second line positioned on the other side of the reference insertion point in the target insertion line
Optionally, the reference insertion point is the midpoint of the target insertion line.
Optionally, each of the target insertion points is configured with one or more virtual objects.
Thus, in the embodiment of the invention, the display map is loaded, and the current target scale of the map is obtained; determining a target insertion point to be displayed of the target insertion line according to the corresponding relation between the target scale and the insertion point of the target insertion line; the corresponding relation comprises: taking a preset insertion point as a reference point, screening other preset insertion points according to the screening interval corresponding to each scale, and determining the insertion point corresponding to each scale, wherein the preset insertion point is the insertion point of the target insertion line under the maximum scale of the map; inserting the corresponding virtual object based on the target insertion point. Because the insertion points are screened from the preset insertion points displayed under the maximum scale and serve as target insertion points to be displayed under other different scales, the positions of the insertion points under all scales can be determined only by calculating the positions of the insertion points under the maximum scale in the embodiment of the invention, and therefore, the position calculation amount of the insertion points along the line is reduced.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the map along-line interpolation point control method in any one of the above method embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A map along-line point-inserting control method is characterized by comprising the following steps:
receiving a target insert line input by a user, wherein the target insert line is composed of a plurality of coordinate points, the target insert line comprises a first end point and a second end point, and the first end point and the second end point are respectively positioned on different sides of the target insert line;
under the maximum scale of the map, sequentially and accumulatively calculating the length of each section of line formed by two adjacent coordinate points according to the indexes of the coordinate points from the first end point; when the length from the currently accumulatively calculated coordinate point to the first end point is equal to half the length of the target insertion line, determining the position of the currently accumulatively calculated coordinate point as the position of the center point of the target insertion line, and determining the center point as a reference insertion point used when determining the first insertion point; if the length from the currently accumulatively calculated coordinate point to the first end point is greater than half the length of the target insert line, determining the position of the central point according to the difference between the accumulated length from the first end point to the last coordinate point and the half length of the first end point;
searching an index of a first coordinate point which is closest to the central point on a first line on one side of the first endpoint under the maximum scale of the map; if the distance between the first coordinate point and the central point is larger than a first distance, determining the first insertion point according to the first distance, and taking the determined first insertion point as a reference insertion point of a next round to continue to calculate a next first insertion point; if the distance between the first coordinate point and the central point is smaller than the first distance, calculating whether the distance accumulated by the next coordinate point to the central point is larger than the first distance; when the first end point is calculated, if the distance between the first end point and a reference insertion point determined by current wheel calculation is smaller than or equal to the first distance, the first insertion point is not set any more;
determining an insertion point of the target insertion line under the maximum scale of the map as a preset insertion point by taking the central point as a starting point, wherein the preset insertion point comprises the central point, a plurality of first insertion points and a plurality of second insertion points which are arranged at a second distance along a second line positioned on one side of the second end point in the target insertion line, the positions and index values of the plurality of first insertion points form a first insertion list, and the positions and index values of the plurality of second insertion points form a second insertion list;
determining display attributes of the preset insertion point under each scale of the map, wherein the display attributes are indicated by key value pairs, keys of the key value pairs are used for representing each scale, values of the key value pairs are used for representing display states of the preset insertion point under the corresponding scale, and the display states comprise display and non-display;
loading and displaying the map, and acquiring a current target scale of the map; according to a screening interval corresponding to the target scale, screening other preset insertion points of the target insertion line except the central point from the first insertion list and the second insertion list respectively to determine the preset insertion points corresponding to the target scale, wherein the screening interval is determined according to the amplification factor between two adjacent scales and the level difference between the maximum scale and the target scale;
setting the display state of a preset insertion point corresponding to the target scale as a displayed preset insertion point as a target insertion point to be displayed on the target insertion line according to the display attribute of the preset insertion point, wherein the target insertion point is arranged at intervals along the target insertion line and is used for inserting a position point of a virtual object, and the target insertion point comprises the central point and other preset insertion points;
and inserting the corresponding virtual object based on the target insertion point and the attribute value of the operation gland between the virtual objects, so that the virtual objects between two adjacent target insertion points are not capped.
2. The method of claim 1, further comprising:
and searching the target inserting point corresponding to the target scale, which is locally stored by the target inserting line, according to the corresponding relation.
3. The method of claim 1 or 2, wherein the map comprises a plurality of scales arranged in descending order of scale, and the insertion points corresponding to the target insertion line at the next scale of the map are a subset of the insertion points corresponding to the previous scale.
4. The method of claim 1, wherein each of said target insertion points is configured with one or more of said virtual objects.
5. A map along-line dot control device, comprising:
a receiving module, configured to receive a target patch cord input by a user, where the target patch cord is composed of a plurality of coordinate points, the target patch cord includes a first endpoint and a second endpoint, and the first endpoint and the second endpoint are located on different sides of the target patch cord respectively;
the reference insertion point determining module is used for sequentially calculating the length of each segment of line formed by two adjacent coordinate points in an accumulated mode from the first end point according to the indexes of the coordinate points under the maximum scale of the map; when the length from the currently accumulatively calculated coordinate point to the first end point is equal to half the length of the target insertion line, determining the position of the currently accumulatively calculated coordinate point as the position of the center point of the target insertion line, and determining the center point as a reference insertion point used when determining the first insertion point; if the length from the currently accumulatively calculated coordinate point to the first end point is greater than half the length of the target insert line, determining the position of the central point according to the difference between the accumulated length from the first end point to the last coordinate point and the half length of the first end point;
means for performing the steps of: searching an index of a first coordinate point which is closest to the central point on a first line on one side of the first endpoint under the maximum scale of the map; if the distance between the first coordinate point and the central point is larger than a first distance, determining a first insertion point according to the first distance, and taking the determined first insertion point as a reference insertion point of a next round to continue to calculate a next first insertion point; if the distance between the first coordinate point and the center point is smaller than the first distance, calculating whether the distance accumulated by the next coordinate point to the reference insertion point is larger than the first distance; when the first end point is calculated, if the distance between the first end point and a reference insertion point determined by current wheel calculation is smaller than or equal to the first distance, the first insertion point is not set any more;
an insertion point setting module, configured to determine, using the central point as a starting point, an insertion point of the target insertion line at a maximum scale of the map, where the insertion point is used as a preset insertion point, where the preset insertion point includes the central point, a plurality of first insertion points, and a plurality of second insertion points, which are set according to a second distance, of a second line located on a side of the second end point in the target insertion line, positions and index values of the plurality of first insertion points constitute a first insertion list, and positions and index values of the plurality of second insertion points constitute a second insertion list; determining display attributes of the preset insertion point under each scale of the map, wherein the display attributes are indicated by key value pairs, keys of the key value pairs are used for representing each scale, values of the key value pairs are used for representing display states of the preset insertion point under the corresponding scale, and the display states comprise display and non-display;
the acquisition module is used for loading and displaying the map and acquiring the current target scale of the map;
a target insertion point determining module, configured to respectively filter, from the first insertion list and the second insertion list, other preset insertion points of the target insertion line except the central point according to a filtering interval corresponding to the target scale, and determine a preset insertion point corresponding to the target scale, where the filtering interval is determined according to a magnification between two adjacent scales and a level difference between the maximum scale and the target scale; setting the display state of a preset insertion point corresponding to the target scale as a displayed preset insertion point as a target insertion point to be displayed on the target insertion line according to the display attribute of the preset insertion point, wherein the target insertion point is arranged at intervals along the target insertion line and is used for inserting a position point of a virtual object, and the target insertion point comprises the central point and other preset insertion points;
and the object insertion module is used for inserting the corresponding virtual object based on the target insertion point and the attribute value of the operation gland between the virtual objects, so that the virtual objects between two adjacent target insertion points cannot be capped.
6. The apparatus according to claim 5, wherein the target insertion point determining module is specifically configured to find the target insertion point corresponding to the target scale, which is locally stored by the target insertion line, according to the corresponding relationship.
7. The apparatus according to claim 5 or 6, wherein the map comprises a plurality of scales arranged in descending order of scale, and the insertion points corresponding to the target insertion line at the next scale of the map are a subset of the insertion points corresponding to the previous scale.
8. An electronic device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein the programs, when executed, implement the steps in the map along-line-plug control method of any of claims 1-4.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps in the map along-line-interpolation control method of any one of claims 1 to 4.
CN201710427255.XA 2017-06-08 2017-06-08 Method and device for controlling interpolation points along map line Active CN109036096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710427255.XA CN109036096B (en) 2017-06-08 2017-06-08 Method and device for controlling interpolation points along map line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710427255.XA CN109036096B (en) 2017-06-08 2017-06-08 Method and device for controlling interpolation points along map line

Publications (2)

Publication Number Publication Date
CN109036096A CN109036096A (en) 2018-12-18
CN109036096B true CN109036096B (en) 2022-11-08

Family

ID=64629477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710427255.XA Active CN109036096B (en) 2017-06-08 2017-06-08 Method and device for controlling interpolation points along map line

Country Status (1)

Country Link
CN (1) CN109036096B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004233264A (en) * 2003-01-31 2004-08-19 Nissan Motor Co Ltd Navigation system
CN1961198A (en) * 2004-05-26 2007-05-09 松下电器产业株式会社 Position information reception device and shape matching method
CN103150961A (en) * 2011-12-01 2013-06-12 株式会社电装 Map display manipulation apparatus
CN103915036A (en) * 2012-12-30 2014-07-09 高德信息技术有限公司 Method and device for calculating road name mark points
CN104239329A (en) * 2013-06-18 2014-12-24 上海博泰悦臻电子设备制造有限公司 Method and device for saving and loading map road shape point data

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101469988B (en) * 2007-12-24 2012-06-13 厦门雅迅网络股份有限公司 Cutting method for map vector data in mobile phone network navigation
JP2010086039A (en) * 2008-09-29 2010-04-15 Nikon Corp Information processing apparatus and information processing program
CN101719335B (en) * 2009-11-12 2014-06-04 上海众恒信息产业股份有限公司 Grid picture electronic map for geographic information system
CN102541418B (en) * 2010-12-30 2015-04-08 上海博泰悦臻电子设备制造有限公司 Processing method and device for realizing map display
CN102543038B (en) * 2010-12-30 2015-07-15 上海博泰悦臻电子设备制造有限公司 Display method and display device
JP2012230258A (en) * 2011-04-26 2012-11-22 Canon Inc Imaging device and control method thereof
CN104036688B (en) * 2014-05-27 2019-05-14 厦门雅迅网络股份有限公司 The method for screening electronic map Point element based on the map amount of loading with dynamic
CN106777074A (en) * 2016-12-13 2017-05-31 天津市骐高数码科技发展有限公司 Geographical information grid electronic map

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004233264A (en) * 2003-01-31 2004-08-19 Nissan Motor Co Ltd Navigation system
CN1961198A (en) * 2004-05-26 2007-05-09 松下电器产业株式会社 Position information reception device and shape matching method
CN103150961A (en) * 2011-12-01 2013-06-12 株式会社电装 Map display manipulation apparatus
CN103915036A (en) * 2012-12-30 2014-07-09 高德信息技术有限公司 Method and device for calculating road name mark points
CN104239329A (en) * 2013-06-18 2014-12-24 上海博泰悦臻电子设备制造有限公司 Method and device for saving and loading map road shape point data

Also Published As

Publication number Publication date
CN109036096A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109831532B (en) Data sharing method, device, equipment and medium
US9983774B2 (en) Authoring and consuming offline an interactive data analysis document
CN106168959B (en) Webpage layout method and device
CN109753612B (en) Questionnaire display control method and device, storage medium and electronic equipment
KR100865797B1 (en) Method for automatically turning e-book pages, and system using the same
CN114841126A (en) Form generation method, device, equipment, storage medium and program product
JP6571102B2 (en) Map update system, navigation device, server device, map update method, navigation method, server device control method, computer program, and recording medium recorded with computer program
CN115129257A (en) Data reading and writing method, electronic equipment and computer readable storage medium
CN108875901B (en) Neural network training method and universal object detection method, device and system
US9134948B1 (en) Method and system for detecting and serving high-resolution images to high-resolution devices
CN109036096B (en) Method and device for controlling interpolation points along map line
CN111127590B (en) Second-order Bezier curve drawing method and device
CN111858789A (en) Road network data processing method and device, electronic equipment and storage medium
CA3162741A1 (en) Method of removing fence points from electronic fence, device and computer equipment
CN114234984B (en) Indoor positioning track smoothing method, system and equipment based on difference matrix
CN115019001A (en) Geological analysis display processing method, device, equipment and medium
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
JP7047562B2 (en) Programs, information processing methods, information terminals and information processing systems
CN108573513B (en) Random element generation method and random element generation device
CN107636650A (en) Meet the document based on the condition for rendering assessment to present
CN111324826A (en) Map viewpoint dynamic method and device under user following mode based on Mapbox
KR101842874B1 (en) Data visualization type recommendation method using meta information
JP5749871B2 (en) Server and method for outputting map image
CN115645905B (en) Cursor display method and device, electronic equipment and storage medium
JP7380087B2 (en) Image display area setting program, server, image display area setting device, image display area setting method, and image display system

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
GR01 Patent grant
GR01 Patent grant