WO2022166496A1 - 一种地图显示方法、装置和电子设备 - Google Patents

一种地图显示方法、装置和电子设备 Download PDF

Info

Publication number
WO2022166496A1
WO2022166496A1 PCT/CN2021/143531 CN2021143531W WO2022166496A1 WO 2022166496 A1 WO2022166496 A1 WO 2022166496A1 CN 2021143531 W CN2021143531 W CN 2021143531W WO 2022166496 A1 WO2022166496 A1 WO 2022166496A1
Authority
WO
WIPO (PCT)
Prior art keywords
map
layer
data layer
user data
content
Prior art date
Application number
PCT/CN2021/143531
Other languages
English (en)
French (fr)
Inventor
刘龙
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21924489.4A priority Critical patent/EP4273715A4/en
Publication of WO2022166496A1 publication Critical patent/WO2022166496A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • G01C21/3667Display of a road map
    • G01C21/3673Labelling using text of road map data items, e.g. road names, POI names
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • G01C21/3679Retrieval, searching and output of POI information, e.g. hotels, restaurants, shops, filling stations, parking facilities
    • G01C21/3682Retrieval, searching and output of POI information, e.g. hotels, restaurants, shops, filling stations, parking facilities output of POI information on a road map
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3863Structures of map data
    • G01C21/387Organisation of map data, e.g. version management or database structures
    • G01C21/3878Hierarchical structures, e.g. layering
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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

Definitions

  • the present application relates to the technical field of intelligent terminals, and in particular, to a map display method, device and electronic device.
  • the present application provides a text graphics method, device and electronic device, and the present application also provides a computer-readable storage medium.
  • the present application provides a map display method, including:
  • map instance object includes one or more basic data layers
  • the user data layer is a layer created according to the user map data
  • Adding the user data layer to the map instance object to generate map data for map display including:
  • the custom style is generated by a style editor, and the process of generating the custom style includes:
  • the layer type includes a point layer, and/or a line layer, and/or a polygon layer;
  • Customize the layer style including setting the icon used by the layer, the font of the layer content, and the shape of the layer content.
  • the adding the user data layer to the map instance object to generate map data for map display further includes:
  • the user data layer and/or the basic data layer are configured based on a content display strategy, wherein the content display strategy includes a layer content hiding strategy and/or a layer content display density.
  • the adding the user data layer to the map instance object to generate map data for map display further includes:
  • the base data layer and/or the user data layer is configured based on the conflict resolution strategy.
  • the display conflict includes content occlusion and/or content duplication.
  • the conflict resolution strategy includes a layer content hiding strategy and/or a layer content avoidance strategy.
  • the present application provides a map display method, including:
  • map instance object includes one or more basic data layers
  • Adding the user data layer to the map instance object to generate map data for map display including:
  • a conflict resolution strategy is set, and the conflict resolution strategy includes a layer content hiding strategy and/or a layer content avoidance strategy;
  • the base data layer and/or the user data layer is configured based on the conflict resolution strategy.
  • the present application provides a map display device, comprising:
  • Custom style acquisition module which is used to acquire custom styles
  • map calling module which is used to call a map instance object, where the map instance object includes one or more basic data layers;
  • Layer creation module which is used to create user layers
  • a layer configuration unit configured to configure the user data layer based on the custom style.
  • the present application provides a map display device, comprising:
  • map calling module which is used to call a map instance object, where the map instance object includes one or more basic data layers;
  • Layer creation module which is used to create user layers
  • a conflict detection unit configured to perform conflict detection on the basic data layer and the user data layer to obtain a detection result, where the detection result is used to describe the user data layer and the basic data layer Display conflicts between;
  • a conflict resolution strategy acquisition unit configured to set a conflict resolution strategy for the basic data layer and/or the user data layer according to the detection result, the conflict resolution strategy includes a layer content hiding strategy and / or layer content avoidance strategy;
  • a layer configuration unit configured to configure the base data layer and/or the user data layer based on the conflict resolution strategy.
  • the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, The electronic device is triggered to perform the method steps described in the first aspect above.
  • the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, The electronic device is triggered to perform the method steps described in the second aspect above.
  • the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, causes the computer to execute the method of the embodiments of the present application.
  • the method of an embodiment of the present application it is possible to add personalized content to the electronic map by superimposing the user data layer, or customize the style of the personalized content by configuring the style of the user data layer.
  • the personalization ability of the map is greatly improved, and the potential of user creativity can be maximized.
  • FIG. 1 shows a flowchart of a custom map style according to an embodiment of the present application
  • FIG. 2 is a schematic diagram showing the rendering effect of a custom map style according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a map display flow according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram showing an electronic map presentation effect according to an embodiment of the present application.
  • FIG. 5 shows a system architecture of an electronic map display system according to an embodiment of the present application
  • FIG. 6 shows an execution flow of a map display method according to an embodiment of the present application
  • Fig. 7 shows the execution flow of using the style editor to generate a custom style according to an embodiment of the present application
  • FIG. 8 is a schematic diagram of icon configuration according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram showing the morphological configuration of layer content according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram showing the display density configuration of map content objects according to an embodiment of the present application.
  • FIG. 11 shows a process of configuring a conflict resolution strategy according to an embodiment of the present application
  • FIG. 12 is a schematic diagram illustrating a conflict between map content objects according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram illustrating collision calculation for map content objects according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram illustrating an avoidance strategy for text content according to an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a layer rendering process based on conflict detection according to an embodiment of the present application.
  • FIG. 16 is a flowchart showing a map display according to an embodiment of the present application.
  • user requirements for an electronic map include visual requirements, that is, the user expects the presentation effect of the electronic map to meet his/her own visual requirements. For example, we want the green space in the map to be marked as dark green (the user does not like the light green in the default setting); another example, we want the map to be displayed in black and white; another example, we want the text in the map to be displayed in large fonts.
  • the presentation effect of the map includes two parts: content and style.
  • the content is an abstract expression of the real physical world, such as a building and a river, including three forms of point, line and surface.
  • the style is the decoration of the content, which is easier for people to understand, such as the color and width of the road, the fill color of the river, the setting of the text font, etc.
  • a style editor for electronic maps is provided, and developers/users can edit map styles in the style editor.
  • the developer/user enters the style editor to edit the map style.
  • the software development kit (SDK) or JavaScript (JS) application program interface of Android (Android) or Apple system (iOS) (Application Programming Interface, API) to call the style setting interface to implement custom map effects.
  • FIG. 1 shows a flowchart of customizing a map style according to an embodiment of the present application.
  • the developer/user enters the style editor (step 110), and edits the map style (step 120) to obtain a custom style.
  • the style editor can directly output the custom style to the map display system to configure the electronic map.
  • the custom style is published (step 131 ).
  • the style editor saves the custom style to the style library and publishes the style ID (ID) of the map style in the style library.
  • ID style ID
  • the style editor may also export the custom style as a JavaScript Object Notation (JavaScript Object Notation, JSON) style fragment (step 132).
  • JSON JavaScript Object Notation
  • the style ID of the custom style can be obtained (step 133 ), the corresponding custom style can be called from the style library through the style ID, and configured using the Java script (JavaScript, JS) API map style.
  • the electronic map is configured using the styleld configuration item in setMapStyleV2 (step 141 ), and the edited map style finally takes effect (step 143 ).
  • JSON style fragment of a custom style it is also possible to obtain a JSON style fragment of a custom style (step 134), and use a Java script (JavaScript, JS) API to directly configure the map style based on the JSON style fragment.
  • JavaScript, JS Java script
  • FIG. 2 is a schematic diagram showing a presentation effect of a custom map style according to an embodiment of the present application.
  • different custom styles for example, six different map styles 201 to 206 shown in FIG. 2 ) are configured for the same map content to present different visual effects.
  • the user requirements for the electronic map also include content requirements, that is, the user hopes that the electronic map can provide the map content required by himself. For example, the user wishes to know the names of shops and companies included in the buildings on the map.
  • the electronic maps provided by electronic map developers do not contain the map content required by users.
  • the electronic map provided by the electronic map developer only shows buildings, streets and building names, but does not include the names of shops and companies contained in the buildings.
  • a feasible application solution is to obtain user map data that meets the content requirements (for example, the names of stores and companies contained in the building) according to the user's content requirements, and write the user map data into the user's map data.
  • the content requirements for example, the names of stores and companies contained in the building
  • the electronic map can present the user map data.
  • the map content of an electronic map takes layers as the basic organizational unit, generally including basic data layers such as water systems, green spaces, roads, buildings, points of interest (POI), etc., and multiple layers form a complete electronic map.
  • the user data layer is created based on the user map data, and the user data layer is superimposed on the base layer, so that the electronic map can present the user map data.
  • FIG. 3 is a schematic diagram of a map display flow according to an embodiment of the present application.
  • the user collects the corresponding user map data according to their own content requirements, or a third-party developer according to the customer's content requirements. After that, upload the user map data, for example, through the HTTP interface or the way of visual annotation to complete the data upload.
  • the locations and names of POIs such as the hotel 311 , the karaoke room 312 , the restaurant 313 , and the store 314 are uploaded.
  • the map rendering engine When displaying the map, first, the map rendering engine automatically renders the user map data according to the set rendering rules, and obtains the user data layer. For example, rendering obtains the user data layer shown at 320 .
  • the user data layer is superimposed on the base data layer.
  • the electronic map rendering effect shown in 330 is presented.
  • FIG. 4 is a schematic diagram illustrating a presentation effect of an electronic map according to an embodiment of the present application.
  • the map content represented by the balloon label (for example, 401) in FIG. 4 is the user data layer created according to the user map data.
  • the user data layer can realize the presentation of user map data, so as to meet the user's content requirements.
  • the user data layer is created based on the user map data uploaded by the user or a third-party developer, it is difficult to unify the presentation style with the basic data layer created by the electronic map developer.
  • the user data layer is attached to the base data layer, compared with the original electronic map, the user data layer is an independent layer, and the style editor of the electronic map cannot be used. This makes the presentation effect of the user data layer unable to meet the user's visual needs.
  • a style editor is established that supports layer-level style definition, and the user data layer can also be referenced as an independent layer
  • the style ID published by the style editor or the JSON style fragment exported by the style editor can be customized.
  • FIG. 5 shows a system architecture of an electronic map display system according to an embodiment of the present application.
  • the system architecture of the electronic map display system includes:
  • a map editor 520 which is used to manage map content, and the map editor 520 supports adding user data layers;
  • the rendering engine 530 which is used to render the map layer (basic data layer and user data layer), and the rendering engine 530 encapsulates all the logic of map drawing;
  • the map SDK/API 540 is used to provide a map capability development kit to the outside world, and the map SDK/API 540 includes various interface services;
  • User data storage 550 which is used to uniformly record all user data content
  • the electronic map display system shown in FIG. 5 can be implemented in a local device (for example, a mobile phone); it can also be implemented in a remote device (for example, a cloud server); it can also be partially implemented in a local device (for example, a style editor 510 ).
  • the map editor 520, the map SDK/API 540 are implemented in the mobile phone), and some are implemented in the remote device (for example, the user data storage 550 is implemented in the cloud server, and the user data storage 550 is implemented in a location-based service (Location Based Services). , LBS) cloud way to provide user data upload and maintenance interface.)
  • LBS Location-based service
  • FIG. 6 shows an execution flow of a map display method according to an embodiment of the present application.
  • the electronic map display system shown in Fig. 5 executes the following flow described in Fig. 6 to output map data for map display.
  • Step 610 calling a map instance object, where the map instance object includes one or more basic data layers;
  • Step 620 calling the user data layer, wherein the user data layer is a layer created according to the user map data;
  • Step 630 adding a user data layer to the map instance object to generate map data for map display.
  • step 631 is executed to configure the user data layer based on the custom style.
  • the map instance object may be a created map instance object, or the electronic map display system may call a map SDK/API method to create a map instance object in real time.
  • the user data layer may be a created layer or a layer created in real time by the electronic map display system calling the user map data.
  • adding the user data layer to the map instance object includes superimposing the user data layer on the base data layer of the map instance object.
  • the user data layer can be configured based on a custom style first, and then the configured user data layer can be added to the map instance object; the user data layer can also be added to the map instance object first, and then the user data layer can be added to the map instance object. Configure the user data layer.
  • a user data layer is added to the map instance object containing the basic data layer, and the user data layer is configured by using a custom style, so that the content of the electronic map can satisfy the content of the user.
  • the presentation effect of the electronic map can meet the visual requirements of the user; according to the method of the embodiment shown in FIG. 6 , the user experience of the electronic map display can be greatly improved.
  • the custom style is generated by the style editor.
  • the user can temporarily generate a custom style for configuring the user data layer in the current application scenario through the style editor when the electronic map needs to be displayed, or call the custom style that has been created before, for example, edit the style based on the style.
  • the style ID published by the editor calls the corresponding custom style from the style library; or, calls the JSON style fragment exported by the style editor according to the custom style.
  • map layers contain different layer types.
  • point layer for example, the layer contains point-like charging pile information
  • line layer for example, the layer contains all line-like road direction information
  • surface layer for example, the layer Included are all faceted water shapes.
  • FIG. 7 shows an execution flow of using a style editor to generate a custom style according to an embodiment of the present application.
  • the following steps shown in FIG. 7 are performed to generate a custom style:
  • Step 710 select the layer type, and select the layer type (eg, point layer, line layer, surface layer) according to the layer content.
  • the layers contain point-like charging pile information, and select the point layer. ;
  • Step 720 edit the layer style and customize the layer style to symbolize the map content, including: icon definition: set the icon used by the layer (for example, select the icon shown in FIG. 8 to configure 801 shopping mall supermarket , 802 Bank, 803ATM, 804 Medical Institution, 805 Restaurant, 806 Cafe, 807 Sports and Fitness, 808 Theater, 809KTV); Font Definition: Set the font of the layer content; Shape Definition: Set the shape of the layer content (for example, , select the form (901-912) as shown in Fig. 9 to arrange railway lines (902), national borders (907) and other map content presentation forms).
  • icon definition set the icon used by the layer (for example, select the icon shown in FIG. 8 to configure 801 shopping mall supermarket , 802 Bank, 803ATM, 804 Medical Institution, 805 Restaurant, 806 Cafe, 807 Sports and Fitness, 808 Theater, 809KTV); Font Definition: Set the font of the layer content; Shape Definition: Set the shape of the layer content (for example, , select the form (901-912) as
  • step 720 the editing of the custom style is completed, and the custom style can be used to configure the map layer.
  • Step 730 Export the layer style, and export the edited custom style in the form of a style ID or a JSON style fragment for use.
  • Step 740 share and publish, share and publish the style ID or JSON style fragment for others to use the custom style.
  • the rendering engine 530 (rendering API/SDK) of the electronic map display system supports style customization of the user data layer.
  • the user data layer and/or the basic data layer are also configured based on the content display policy.
  • the content display strategy includes a layer content hiding strategy
  • the user can configure the data in the map data that is not displayed on the map layer by setting the layer content hiding strategy.
  • the user map data includes store names, company names, and entertainment venue names in buildings.
  • the purpose of the user browsing the electronic map is shopping and consumption, and he does not need to know the office space in the building. Therefore, the user sets the layer content hiding policy of the user data layer to hide the company name.
  • the basic data layer for roads includes ordinary roads, highways, railways, and bicycle-only roads.
  • the purpose of the user browsing the electronic map is to travel by self-driving, and he does not need to know the road where the private car cannot be used. Therefore, the user sets the layer content hiding strategy of the user data layer to hide railways and bicycle-only roads.
  • the content display strategy also includes the display density of layer content, and the user can configure the display density of one or more types of display objects (eg, POIs) in the electronic map by setting the display density of layer content.
  • the specific logic for adjusting the display density is as follows:
  • For each layer object for example, the five-pointed star 1001 shown in Figure 10
  • calculate other objects As shown in Figure 10, the five-pointed stars 1002, 1003
  • the display density of layer content can be configured for a certain type of object in a single layer; the display density of layer content can also be configured uniformly for multiple types of objects in a single layer; it can also be configured for multiple layers of objects.
  • Multi-type objects uniformly configure the display density of layer content, for example, configure the display density of layer content for all types of POIs of all basic data layers and user data layers.
  • the rendering engine 530 (rendering API/SDK) of the electronic map display system supports the adjustment of the display density, and the adjustment of the display density is performed inside the rendering engine 530.
  • the multiple basic data layers in the map instance object called in step 610 are displayed in a superimposed manner, and the user data layer is superimposed on the basic data layer.
  • the map content of the upper layer obscures the map content of the lower layer.
  • the displayed map content may also have display conflicts, for example, multiple icons of the same layer are stacked. This may lead to the absence of the content finally presented by the electronic map, and cause the content displayed in the electronic map to be cluttered, which affects the presentation effect.
  • step 630 display conflict detection is performed on all layers (basic data layer and user data layer) to determine whether there is a display conflict; a conflict resolution strategy is set according to the conflict detection result; Configure the layers with display conflicts according to the conflict resolution strategy to resolve the display conflicts and improve the presentation effect of the electronic map.
  • FIG. 11 shows a flow of configuring a conflict resolution strategy according to an embodiment of the present application.
  • the following process shown in FIG. 11 is performed to solve the display conflict problem existing between layers:
  • Step 1110 performing display conflict detection on the basic data layer and the user data layer to obtain a detection result
  • Step 1120 setting a conflict resolution strategy according to the detection result
  • Step 1130 configure the layer based on the conflict resolution strategy.
  • the display conflict detection includes display conflict detection within a single layer and/or display conflict detection among multiple layers. For example, in one implementation of step 1110, display conflict detection is performed for all layers.
  • the conflict resolution strategy may be directed to one layer or may be directed to multiple layers, and the conflict resolution strategy may be directed to the base data layer and/or the user data layer.
  • the configuration object of the conflict resolution strategy may also be the basic data layer and/or the user data layer.
  • display conflicts between layers include content occlusion.
  • the user data layer is used to present the business indicia (POI), for example, the business indicia “Longjie Taekwondo” in the indicia box 1201, the merchant indicia “Jicai WORK” in the The merchant in box 1203 marks "Wangjing Tennis Club (Yuhaiyuan)".
  • POI business indicia
  • the business mark (POI) "Longjie Taekwondo" in the mark box 1201 in the user data layer blocks the community name "Yuhaiyuan Wuli" in the basic data layer below, resulting in the community name "Yuhaiyuan Wuli". Haiyuan Wuli" cannot be presented completely, so that users may not be able to correctly identify the community name "Yuhaiyuan Wuli”.
  • the business mark "Wangjing Tennis Club (Yuhaiyuan Store)" in the mark box 1203 of the user data layer blocks the road name "Yuquan Road” in the underlying data layer, so the road name "Yuquan Road” cannot be fully displayed. As a result, the user may not be able to correctly identify the road name "Yuquan Road”.
  • the business mark "Jicai WORK" in the mark box 1202 in the user data layer completely overlaps with the business mark below in the user data layer, so that the business mark below cannot be presented completely, so that the user cannot recognize the business mark below.
  • collision detection is performed based on collision calculation.
  • map content objects for example, text annotation content, icons, point-like objects
  • collision calculation is performed according to the minimum outer rectangle of the object to determine whether the map content objects are between them.
  • the minimum outer rectangle of map content object A is rectangle 1311
  • the minimum outer rectangle of map content object B is rectangle 1312.
  • the conflict resolution strategy includes a layer content avoidance strategy for map content objects whose positions can be moved.
  • the problem of occlusion of map content objects is solved by avoidance layout.
  • the minimum outer rectangle of text A is rectangle 1400.
  • the text center point A 0 (the minimum outer rectangle of text A The center point of the rectangle (Center(x, y))) is the reference, and the text can be directed to position 1401 (text (up)), position 1402 (text (bottom)), position 1403 (text (left)), and position 1404 (text). (right)) moves in four directions.
  • the text can be moved to 1404 (text (right)) by default, and if the right side is blocked, it can be moved to the left (1403)/upper (1401)/downward (1402).
  • the conflict resolution strategy further includes a layer content hiding strategy for map content objects whose positions cannot be moved.
  • the hidden map content objects are not displayed. The problem of messy rendering caused by partial occlusion of map content objects, and reduced display memory consumption.
  • FIG. 15 shows a schematic diagram of a layer rendering process based on conflict detection according to an embodiment of the present application.
  • there may be content in each layer (user data layer a, basic data layer a 1 , basic data layer a 2 , . . . , basic data layer a n ) in electronic map A
  • All the occluded map content objects are subjected to conflict detection (step 1510).
  • a collision calculation is performed to confirm that there are map content objects occluded by content.
  • the movable map content objects for example, text
  • perform avoidance layout for example, move the text to the right by default, and put it on the left/above/below if the right side is occluded
  • the immovable map content object for example, a building icon
  • the user data layer a 1 , the basic data layer a 1 1 , the basic data layer a 1 2 , . . . , and the basic data layer a 1 n are generated.
  • the display conflict between layers also includes content duplication.
  • the business mark "Jicai WORK" in the mark box 1202 in the user data layer is duplicated with the building name "Jicai WORK" in the underlying basic data layer, which results in the display of the electronic map. Redundant content appears in the map content, which makes the presentation effect of the electronic map cluttered and greatly affects the user's visual experience.
  • conflict detection is performed based on content identification. Specifically, content recognition is performed for text content in all layers (for example, text annotation content, icons/pictures containing text), and the recognition results of different text content are compared to determine whether there is content duplication among map content objects.
  • the conflict resolution strategy includes hiding the duplicate content party (eg, by default hiding the map content object of the user data layer). For example, hide the merchant tag "Jicai Stadium" in tag box 1202 in the user data layer.
  • step 1510 for all layers in the electronic map (user data layer a, basic data layer a 1 , basic data layer a 2 , . . . , basic data layer a Content identification and content comparison are performed on the text content of n ) to confirm that there are map content objects with duplicate content.
  • map content objects with duplicate content mark the map content objects with duplicate content in the user data layer.
  • layered rendering layered rendering (layered rendering a 1 , layered rendering a 1 1 , layered rendering a 1 2 , ..., layered rendering a 1 n )
  • the marked map content objects are no longer displayed, other map content Objects are displayed normally.
  • the basic data layer and the user data layer participate in conflict detection together, and then render output in layers, which can effectively solve the problem of content conflict across layers and ensure that the addition of the user data layer does not affect the The browsing experience of the entire electronic map.
  • FIG. 16 is a flowchart showing a map display according to an embodiment of the present application.
  • the electronic map display system performs the following steps as shown in Figure 16 to realize the display of the electronic map:
  • Step 1600 create a map instance, for example, call the map SDK/API method to create a map instance object; for example, use the following code fields:
  • Step 1610 create a user data layer (CustomLayer, CL) and add it to the map instance object;
  • Step 1611 configure the style of the CL based on the custom style, and the custom style is generated by the style editor;
  • the user data layer (CustomLayer) is configured with the custom style whose style ID is xxxx;
  • Step 1620 configure the style of the basic data layer (or, do not perform configuration processing, use the default style);
  • Step 1630 setting the content display strategy of all layers, for each layer (basic data layer and user data layer), set the corresponding content display strategy as needed; Some POI categories are not displayed), and/or, the display density of the layer content (adjust the display density of the content of a layer); for example, set the following code for the rendering API/SDK:
  • the display density of the user data layer (CustomLayer) is configured to be 0.6.
  • Step 1640 conflict detection
  • the rendering engine needs to perform conflict detection on all data layers to ensure that the content between layers does not have problems affecting readability due to occlusion (for example, the text on the road and the POI text do not overlap, the POI icon do not overlap, etc.), and ensure that the content between layers does not have problems that affect the rendering effect due to repeated content (such as the text on the road and the POI text are not repeated, etc.);
  • Step 1650 Render output layer by layer, and the rendering engine performs layer by layer rendering output to generate final required map data (the map data is output to the display module for display).
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller may be implemented in any suitable manner, for example, the controller may take the form of eg a microprocessor or processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory.
  • the controller may take the form of eg a microprocessor or processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers
  • ASICs application specific integrated circuits
  • controllers include but are not limited to
  • the controller in addition to implementing the controller in the form of pure computer-readable program code, the controller can be implemented as logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded devices by logically programming the method steps.
  • the same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for realizing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions can be regarded as both a software module implementing a method and a structure within a hardware component.
  • an embodiment of the present application further proposes a map display device.
  • the map display device is installed in a local terminal (such as a mobile phone) that can display an electronic map or a server (such as a cloud map server) that can provide electronic map services for user terminals, and the map display device includes:
  • Custom style acquisition module which is used to acquire custom styles
  • map calling module which is used to call a map instance object, and the map instance object includes one or more basic data layers;
  • Layer creation module which is used to create user layers
  • a map generation module which is used to add a user data layer to a map instance object to generate map data for map display.
  • the map generation module includes:
  • Layer hive which is used to configure user data layers based on custom styles.
  • an embodiment of the present application further proposes another map display device.
  • the map display device is installed in a local terminal (such as a mobile phone) that can display an electronic map or a server (such as a cloud map server) that can provide electronic map services for user terminals, and the map display device includes:
  • map calling module which is used to call a map instance object, and the map instance object includes one or more basic data layers;
  • Layer creation module which is used to create user layers
  • a map generation module which is used to add a user data layer to a map instance object to generate map data for map display.
  • the map generation module includes:
  • a conflict detection unit which is used to perform conflict detection on the basic data layer and the user data layer to obtain a detection result, and the detection result is used to describe the display conflict between the user data layer and the basic data layer;
  • a conflict resolution strategy acquisition unit which is used to set a conflict resolution strategy for the basic data layer and/or the user data layer according to the detection result, and the conflict resolution strategy includes a layer content hiding strategy and/or a layer content avoidance strategy;
  • Layer hive for configuring base data layers and/or user data layers based on conflict resolution strategies.
  • each module/unit for the convenience of description, when describing the device, functions are divided into various modules/units for description, and the division of each module/unit is only a logical function division. At the same time, the functions of each module/unit may be implemented in one or more software and/or hardware.
  • the apparatuses proposed in the embodiments of the present application may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware.
  • the detection module may be a separately established processing element, or may be integrated in a certain chip of the electronic device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together, and can also be implemented independently.
  • each step of the above-mentioned method or each of the above-mentioned modules can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or more digital signal processors ( Digital Singnal Processor, DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of an on-chip device (System-On-a-Chip, SOC).
  • An embodiment of the present application also provides an electronic device, the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered The device performs the method steps described in the embodiments of the present application.
  • the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions.
  • the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device is made to execute the application. The method steps described in the examples.
  • the processor of the electronic device may be an on-chip device SOC, and the processor may include a central processing unit (Central Processing Unit, CPU), and may further include other types of processors.
  • the processor of the electronic device may be a PWM control chip.
  • the involved processor may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded Neural-network Process Units (NPU, NPU) ) and an image signal processor (Image Signal Processing, ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of programs in the technical solution of the present application Wait. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
  • the memory of the electronic device may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory) memory, RAM) or other types of dynamic storage devices that can store information and instructions, also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory, CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or can also be used for portable or Any computer-readable medium that stores desired program code in the form of instructions or data structures and can be accessed by a computer.
  • ROM read-only memory
  • RAM random access memory
  • dynamic storage devices that can store information and instructions
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • optical disk storage including compact disk, laser disk, optical disk, digital versatile disk
  • a processor may be combined with a memory to form a processing device, which is more commonly an independent component.
  • the processor is used to execute program codes stored in the memory to implement the method described in the embodiment of the present application.
  • the memory can also be integrated in the processor, or be independent of the processor.
  • the device, apparatus, module or unit described in the embodiments of the present application may be specifically implemented by a computer chip or entity, or implemented by a product having a certain function.
  • the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method provided by the embodiment of the present application.
  • An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
  • At least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
  • the terms “comprising”, “comprising” or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included.
  • an element qualified by the phrase “comprising a" does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.
  • the application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Automation & Control Theory (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Computer Hardware Design (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Ecology (AREA)
  • Mathematical Physics (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Instructional Devices (AREA)
  • Image Generation (AREA)

Abstract

一种地图显示方法、装置和电子设备。方法包括:调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层(610);调用用户数据图层,其中,所述用户数据图层为根据用户地图数据所创建的图层(620);将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据(630),包括:基于自定义样式配置所述用户数据图层(631)。根据所述方法,既可以通过叠加用户数据图层的方式为电子地图新增个性化的内容,也可以通过对用户数据图层进行样式配置的方式对个性化内容进行样式定制,从而大大提升了地图的个性化能力,可以最大限度释放用户创意的潜力。

Description

一种地图显示方法、装置和电子设备 技术领域
本申请涉及智能终端技术领域,特别涉及一种地图显示方法、装置和电子设备。
背景技术
目前,电子地图被广泛应用于人们的出行场景。面向各个垂直领域的开发者以及用户,主流的电子地图开发厂商也都开发了自己的电子地图,以提供地图呈现、地点搜索、路径规划、导航等功能,例如,百度地图、高德地图、谷歌地图。
随着移动电子设备的广泛应用,电子地图的应用场景也不断拓展,用户针对电子地图的用户需求也更为复杂细化。主流的电子地图开发厂商所开发的电子地图已不能满足不断复杂细化的电子地图用户需求。
发明内容
针对现有技术下电子地图不能满足电子地图用户需求的问题,本申请提供了一种文字图形化方法、装置和电子设备,本申请还提供一种计算机可读存储介质。
本申请实施例采用下述技术方案:
第一方面,本申请提供一种地图显示方法,包括:
调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
调用用户数据图层,其中,所述用户数据图层为根据用户地图数据所创建的图层;
将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,包括:
基于自定义样式配置所述用户数据图层。
在上述第一方面的一种可行的实现方式中,所述自定义样式由样式编辑器生成,生成所述自定义样式的过程包括:
选择图层类型,所述图层类型包括点图层、和/或线图层、和/或面图层;
对图层样式进行自定义,包括,设定图层使用的图标、图层内容的字体、图层内容的形态。
在上述第一方面的一种可行的实现方式中,所述将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,还包括:
基于内容显示策略配置所述用户数据图层和/或所述基础数据图层,其中,所述内容显示策略包括图层内容隐藏策略和/或图层内容显示密度。
在上述第一方面的一种可行的实现方式中,所述将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,还包括:
对所述基础数据图层以及所述用户数据图层进行显示冲突检测,以获取检测结果,所述检测结果用于描述所述用户数据图层与所述基础数据图层之间的显示冲突;
根据所述检测结果,设定冲突解决策略;
基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
在上述第一方面的一种可行的实现方式中,所述显示冲突包括内容遮挡和/或内容重复。
在上述第一方面的一种可行的实现方式中,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略。
第二方面,本申请提供一种地图显示方法,包括:
调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
创建用户数据图层;
将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,包括:
对所述基础数据图层以及所述用户数据图层进行显示冲突检测,以获取检测结果;
根据所述检测结果,设定冲突解决策略,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略;
基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
第三方面,本申请提供一种地图显示装置,包括:
自定义样式获取模块,其用于获取自定义样式;
地图调用模块,其用于调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
图层创建模块,其用于创建用户图层;
地图生成模块,其用于将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,所述地图生成模块包括:
图层配置单元,其用于基于所述自定义样式配置所述用户数据图层。
第四方面,本申请提供一种地图显示装置,包括:
地图调用模块,其用于调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
图层创建模块,其用于创建用户图层;
地图生成模块,其用于将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,所述地图生成模块包括:
冲突检测单元,其用于对所述基础数据图层以及所述用户数据图层进行冲突检测,以获取检测结果,所述检测结果用于描述所述用户数据图层与所述基础数据图层之间的显示冲突;
冲突解决策略获取单元,其用于根据所述检测结果,设定针对所述基础数据图层和/或所述用户数据图层的冲突解决策略,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略;
图层配置单元,其用于基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
第五方面,本申请提供了一种电子设备,所述电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述电子设备执行如上述第一方面所述的方法步骤。
第六方面,本申请提供了一种电子设备,所述电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述电子设备执行如上述第二方面所述的方法步骤。
第七方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例的方法。
根据本申请实施例所提出的上述技术方案,至少可以实现下述技术效果:
根据本申请一实施例的方法,既可以通过叠加用户数据图层的方式为电子地图新增个性化的内容,也可以通过对用户数据图层进行样式配置的方式对个性化内容进行样式定制,从而大大提升了地图的个性化能力,可以最大限度释放用户创意的潜力。
附图说明
图1所示为本申请一实施例自定义地图样式的流程图;
图2所示为本申请一实施例自定义地图样式的呈现效果示意图;
图3所示为根据本申请一实施例的地图显示流程示意图;
图4所示为根据本申请一实施例的电子地图呈现效果示意图;
图5所示为根据本申请一实施例的电子地图显示系统的系统架构;
图6所示为根据本申请一实施例的地图显示方法的执行流程;
图7所示为根据本申请一实施例使用样式编辑器生成自定义样式的执行流程;
图8所示为根据本申请一实施例的图标配置示意图;
图9所示为根据本申请一实施例的图层内容的形态配置示意图;
图10所示为根据本申请一实施例的地图内容对象显示密度配置示意图;
图11所示为根据本申请一实施例配置冲突解决策略的流程;
图12所示为根据本申请一实施例的地图内容对象冲突示意图;
图13所示为根据本申请一实施例的针对地图内容对象进行碰撞计算的示意图;
图14所示为根据本申请一实施例的针对文字内容进行避让策略的示意图;
图15所示为根据本申请一实施例的基于冲突检测的图层渲染流程示意图;
图16所示为根据本申请一实施例的地图显示流程图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
一般的,针对电子地图的用户需求包括视觉需求,即,用户希望电子地图的呈现效果满足自身的视觉需求。例如,希望地图中的绿地被标记为深绿色(用户不喜欢默认设置中的浅绿色);又例如,希望地图以黑白方式显示;又例如,希望地图中的文字以大字体显示。
针对用户的视觉需求,一种可行的应用方案是,根据用户的用户需求(视觉需求)调 整电子地图的呈现效果。具体的,地图的呈现效果包括内容和样式两个部分。内容是对真实物理世界的抽象表达,比如一个建筑物一条河流等,包括点线面三种形态。样式是对内容的装饰,更易于让人读懂,比如道路的颜色、宽度,河流的填充颜色,文字字体的设置等。
在一种可行的地图显示方案中,允许开发者/用户自定义电子地图的地图样式。具体的,提供针对电子地图的样式编辑器,开发者/用户可以在样式编辑器中编辑地图样式。开发者/用户进入样式编辑器编辑地图样式,地图样式被编辑完成后,在安卓(Android)或苹果系统(iOS)的软件开发工具包(Software Development Kit,SDK)或者JavaScript(JS)应用程序接口(Application Programming Interface,API)中调用样式设置接口实现自定义地图效果。
图1所示为本申请一实施例自定义地图样式的流程图。如图1所示,开发者/用户进入样式编辑器(步骤110),编辑地图样式(步骤120),以获取自定义样式。
在地图样式被编辑完成后,样式编辑器可以直接输出自定义样式到地图显示系统以配置电子地图。
或者,在地图样式被编辑完成后,发布自定义样式(步骤131),例如,样式编辑器将自定义样式保存到样式库,并发布该地图样式在样式库中的样式编号(ID)。
或者,在地图样式被编辑完成后,样式编辑器还可以将自定义样式导出为Java脚本对象简谱(JavaScript Object Notation,JSON)样式片段(步骤132)。
当需要使用编辑好的自定义样式配置电子地图时,可以获取自定义样式的样式ID(步骤133),通过样式ID从样式库调用对应的自定义样式,使用Java脚本(JavaScript,JS)API配置地图样式。例如,使用setMapStyleV2中的styleld配置项配置电子地图(步骤141),最终生效编辑的地图样式(步骤143)。
也可以获取自定义样式的JSON样式片段(步骤134),使用Java脚本(JavaScript,JS)API直接基于JSON样式片段配置地图样式。例如,使用setMapStyleV2中的styleJson配置项配置电子地图(步骤142),最终生效编辑的地图样式(步骤143)。
图2所示为本申请一实施例自定义地图样式的呈现效果示意图。如图2所示,针对同一地图内容,配置不同的自定义样式(例如,图2所示的六种不同的地图样式201~206),可以呈现不同的视觉效果。
进一步的,针对电子地图的用户需求还包括内容需求,即,用户希望电子地图可以提供自身所需的地图内容。例如,用户希望得知地图上建筑物内所包含的商店、公司的名称。然而,在实际应用场景中,由于电子地图开发厂商在开发电子地图时,并不能预测所有的用户内容需求,因而导致电子地图开发厂商所提供的电子地图中并未包含用户所需的地图内容。例如,电子地图开发厂商所提供的电子地图仅仅显示了建筑物、街道以及建筑物名称,并未包含建筑物内所包含的商店、公司的名称。
针对用户的内容需求,一种可行的应用方案是,根据用户的内容需求,获取满足内容需求的用户地图数据(例如,建筑物内所包含的商店、公司的名称),将用户地图数据写入电子地图的数据中,以使得电子地图可以呈现用户地图数据。
具体的,电子地图的地图内容以图层为基本组织单元,一般包括水系、绿地、道路、建筑物、兴趣点(Point of Interest,POI)等基础数据图层,多个图层组成一份完整的电 子地图。基于用户地图数据创建用户数据图层,将用户数据图层叠加在基础图层之上,就可以使得电子地图呈现用户地图数据。
进一步的,在实际应用场景中,由于数据获取难度、成本控制等原因,电子地图开发厂商无法针对所有的用户内容需求去获取对应的用户地图数据。因此,在一种可行的方案中,允许第三方开发者/用户自行收集用户地图数据。
具体的,图3所示为根据本申请一实施例的地图显示流程示意图。用户根据自身的内容需求,或者,第三方开发者根据客户的内容需求,采集对应的用户地图数据。之后,将用户地图数据上传,例如,通过HTTP接口或者可视化标注的方式完成数据上传。如图3中310所示,将酒店311、练歌房312、餐馆313、商店314等POI的位置、名称上传。
在进行地图显示时,首先,地图渲染引擎按照设定好的渲染规则将用户地图数据自动渲染出来,获取用户数据图层。例如,渲染获得320所示的用户数据图层。
在电子地图呈现时,将用户数据图层叠加在基础数据图层之上。例如,呈现330所示的电子地图呈现效果。
图4所示为根据本申请一实施例的电子地图呈现效果示意图。图4中气球标签(例如,401)代表的地图内容就是根据用户地图数据所创建的用户数据图层。
通过用户数据图层可以实现用户地图数据的呈现,从而满足用户的内容需求。然而,在实际应用场景中,由于用户数据图层是根据用户或第三方开发者上传的用户地图数据所创建的,其与电子地图开发厂商所创建的基础数据图层在呈现风格上难以统一,并且,由于用户数据图层附加在基础数据图层,相较于原始的电子地图,用户数据图层为独立图层,无法使用电子地图的样式编辑器。这就使得用户数据图层的呈现效果无法满足用户的视觉需求。
针对用户数据图层的呈现效果无法满足用户的视觉需求的问题,在本申请一实施例中,建立了支持图层级别的样式定义的样式编辑器,用户数据图层作为独立图层也可引用样式编辑器发布的样式ID或样式编辑器导出的JSON样式片段,实现样式可定制。
图5所示为根据本申请一实施例的电子地图显示系统的系统架构。如图5所示,电子地图显示系统的系统架构包括:
样式编辑器510,其用于提供图层级别的样式定制能力;
地图编辑器520,其用于管理地图内容,地图编辑器520支持增加用户数据图层;
渲染引擎530,其用于渲染地图图层(基础数据图层以及用户数据图层),渲染引擎530封装了地图绘制的所有逻辑;
地图SDK/API 540,其用于对外提供地图能力开发包,地图SDK/API 540包含各种接口服务;
用户数据存储550,其用于统一记录所有用户数据内容
图5所示电子地图显示系统可以在本地设备(例如,手机)中实现;也可以在远程设备(例如,云服务器)中实现;还可以部分的在本地设备中实现(例如,样式编辑器510、地图编辑器520、地图SDK/API 540在手机中实现),部分的在远程设备中实现(例如,用户数据存储550在云服务器中实现,用户数据存储550以基于位置的服务(Location Based Services,LBS)云的方式提供用户数据上传和维护的接口。)
图6所示为根据本申请一实施例的地图显示方法的执行流程。图5所示的电子地图显 示系统执行图6所述的下述流程,以输出用于进行地图显示的地图数据。
步骤610,调用地图实例对象,地图实例对象包括一个或多个基础数据图层;
步骤620,调用用户数据图层,其中,用户数据图层为根据用户地图数据所创建的图层;
步骤630,将用户数据图层添加到地图实例对象,以生成用于地图显示的地图数据。
在执行步骤630的过程中,执行步骤631,基于自定义样式配置用户数据图层。
根据图6所示实施例的方法,既可以通过叠加用户数据图层的方式为电子地图新增个性化的内容,也可以通过对用户数据图层进行样式配置的方式对个性化内容进行样式定制,从而大大提升了地图的个性化能力,可以最大限度释放用户创意的潜力。
进一步的,在步骤610中,地图实例对象可以是已创建好的地图实例对象,也可以是电子地图显示系统调用地图SDK/API方法实时创建地图实例对象。
在步骤620中,用户数据图层可以是已创建好的图层,也可以是电子地图显示系统调用用户地图数据实时创建的图层。
在步骤630的一种实现方式中,将用户数据图层添加到地图实例对象,包括,将用户数据图层叠加到地图实例对象的基础数据图层上方。具体的,可以先基于自定义样式配置用户数据图层,然后将配置好的用户数据图层添加到所述地图实例对象;也可以先将用户数据图层添加到所述地图实例对象,然后对用户数据图层进行配置。
根据图6所示实施例的方法,在包含基础数据图层的地图实例对象中添加用户数据图层,并且,使用自定义样式配置用户数据图层,可以在电子地图的呈现内容满足用户的内容需求的基础上,使得电子地图的呈现效果满足用户的视觉需求;根据图6所示实施例的方法,可以大大提高电子地图显示的用户体验。
进一步的,在步骤630中,自定义样式由样式编辑器生成。用户可以在需要进行电子地图显示时,在当前应用场景下临时通过样式编辑器生成用于配置用户数据图层的自定义样式,也可以调用之前已经创建好的自定义样式,例如,基于样式编辑器所发布的样式ID从样式库中调用对应的自定义样式;或者,调用样式编辑器根据自定义样式所导出的JSON样式片段。
进一步的,在实际应用场景中,地图图层包含不同的图层类型。例如,点图层(例如,图层包含的都是点状的充电桩信息)、线图层(例如,图层包含的都是线状的道路走向信息)、面图层(例如,图层包含的都是面状的水域形状)。
具体的,图7所示为根据本申请一实施例使用样式编辑器生成自定义样式的执行流程。在本申请一实施例中,执行图7所示的下述步骤以生成自定义样式:
步骤710,选择图层类型,根据图层内容选择图层类型(例如,点图层、线图层、面图层),比如图层包含的都是点状的充电桩信息,选择点图层;
步骤720,编辑图层样式,对图层样式进行自定义,以将地图内容符号化,包括:图标定义:设定图层使用的图标(例如,选用如图8所示的图标配置801商场超市、802银行、803ATM、804医疗机构、805餐馆、806咖啡馆、807体育健身、808影剧院、809KTV);字体定义:设定图层内容的字体;形态定义:设定图层内容的形态(例如,选用如图9所示的形态(901~912)配置铁路线(902)、国界(907)等地图内容的呈现形态)。
在步骤720完成后,自定义样式的编辑完成,自定义样式即可用于配置地图层。
为了便于用户使用自定义地图样式,还执行:
步骤730,导出图层样式,将编辑好的自定义样式以样式ID的方式或者JSON样式片段的方式导出备用。
进一步的,还执行:
步骤740,分享发布,将样式ID或者JSON样式片段分享发布,以供他人使用自定义样式。
进一步的,为了实现步骤631,在本申请一实施例中,电子地图显示系统的渲染引擎530(渲染API/SDK)支持用户数据图层的样式自定义。
进一步的,在电子地图中,图层用于显示地图数据。然而,在实际应用场景中,并不是所有的地图数据都是用户所希望看到的。因此,在本申请一实施例中,在执行步骤630的过程中,还基于内容显示策略配置用户数据图层和/或基础数据图层。
具体的,内容显示策略包括图层内容隐藏策略,用户可以通过设定图层内容隐藏策略来配置地图数据中不在地图图层上显示的数据。例如,用户地图数据包含建筑物内的商店名称、公司名称、娱乐场所名称。在一应用场景中,用户浏览电子地图的目的是逛街消费,其并不需要了解建筑物内的办公场所。因此,用户设定用户数据图层的图层内容隐藏策略为隐藏公司名称。又例如,针对道路的基础数据图层包含普通公路、高速公路、铁路、自行车专用道路。在一应用场景中,用户浏览电子地图的目的是自驾出行,其并不需要了解无法行使私家车的道路。因此,用户设定用户数据图层的图层内容隐藏策略为隐藏铁路以及自行车专用道路。
进一步的,内容显示策略还包括图层内容显示密度,用户可以通过设定图层内容显示密度来配置电子地图中一类或多类显示对象(例如,POI)的显示密度。在一实施例中,显示密度的调节的具体逻辑如下:
遍历图层所有的对象(例如,如图10所示的五角星1001~1006);具体的,如果对象存在重要度等排列(rank)属性(指对象的排名信息),按rank值高低进行排序后再遍历;
对每一个图层对象(例如,如图10所示的五角星1001),计算一定半径(由显示密度控制,例如,如图10所示的圆形区域半径r)范围内出现的其它对象(如图10所示的五角星1002、1003),将其标记出来;
在图层渲染时,所有未被标记的图层对象保留显示,已标记对象不显示(例如,保留显示五角星1001、1004、1005、1006,不显示五角星1002、1003)。
进一步的,可以针对单一图层的某一类对象进行图层内容显示密度的配置;也可以针对单一图层的多类对象统一进行图层内容显示密度的配置;还可以针对多个图层的多类对象统一进行图层内容显示密度的配置,例如,针对所有的基础数据图层以及用户数据图层的所有种类的POI进行图层内容显示密度的配置。
进一步的,为了实现步骤631,在本申请一实施例中,电子地图显示系统的渲染引擎530(渲染API/SDK)支持显示密度的调节,显示密度的调节在渲染引擎530内部进行。
进一步的,在实际应用场景中,步骤610所调用的地图实例对象中的多个基础数据图层是叠加显示的,并且,用户数据图层为叠加到基础数据图层之上的,因此,多个基础数据图层之间、用户数据图层与基础数据图层之间,图层显示的地图内容时就有可能出现显示冲突,例如,上层图层的地图内容遮挡了下层图层的地图内容。另外,在单一图层内, 显示的地图内容也有可能出现显示冲突,例如,同一图层的多个图标堆叠。这就有可能导致电子地图最终呈现的内容出现缺失,并且,导致电子地图中显示内容杂乱,影响呈现效果。
针对上述问题,在步骤630的一种实现方式中,对所有图层(基础数据图层以及用户数据图层)进行显示冲突检测,判断是否存在显示冲突;根据冲突检测结果设定冲突解决策略;根据冲突解决策略配置存在显示冲突的图层,以解决显示冲突,提升电子地图的呈现效果。
图11所示为根据本申请一实施例配置冲突解决策略的流程。在步骤630的一种实现方式中,执行图11所示的下述流程以解决图层间所存在的显示冲突问题:
步骤1110,对基础数据图层以及用户数据图层进行显示冲突检测,以获取检测结果;
步骤1120,根据检测结果,设定冲突解决策略;
步骤1130,基于冲突解决策略配置图层。
具体的,显示冲突检测包括针对单一图层内的显示冲突检测和/或多个图层间的显示冲突检测。例如,在步骤1110的一种实现方式中,针对所有图层进行显示冲突检测。
具体的,在实际应用场景中,当两个图层间存在显示冲突时,可以调整一个图层的显示内容解决显示冲突,也可以调整两个图层的显示内容解决显示冲突。因此,在步骤920中,冲突解决策略可以是针对一个图层,也可以是针对多个图层,冲突解决策略可以针对基础数据图层和/或用户数据图层。对应的,在步骤1130中,冲突解决策略的配置对象也可以为基础数据图层和/或用户数据图层。
进一步的,在实际应用场景中,图层间的显示冲突包括内容遮挡。例如,如图12所示,用户数据图层用于呈现商家标记(POI),例如,标记框1201中的商家标记“龙杰跆拳道”、标记框1202中的商家标记“吉彩体育馆”、标记框1203中的商家标记“望京网球俱乐部(玉海园店)”。
在图12中,用户数据图层中标记框1201中的商家标记(POI)“龙杰跆拳道”,就遮挡了下方基础数据图层中小区名称“玉海园五里”,导致小区名称“玉海园五里”无法完整呈现,从而使得用户可能无法正确识别小区名称“玉海园五里”。
用户数据图层中标记框1203中的商家标记“望京网球俱乐部(玉海园店)”就遮挡了下方基础数据图层中道路名称“玉泉路”,导致道路名称“玉泉路”无法完整呈现,从而使得用户可能无法正确识别道路名称“玉泉路”。
用户数据图层中标记框1202中的商家标记“吉彩体育馆”与用户数据图层中下方的商家标记完全重叠,导致下方的商家标记无法完整呈现,从而使得用户无法识别下方商家标记。
针对内容遮挡,在本申请一实施例中,基于碰撞计算进行冲突检测。具体的,针对每一个图层中可能存在内容遮挡的地图内容对象(例如,文字注记内容、图标、点状对象),根据对象的最小外部矩形进行碰撞计算,以确定地图内容对象之间是否存在内容遮挡。如图13所示,地图内容对象A的最小外部矩形为矩形1311,地图内容对象B的最小外部矩形为矩形1312,矩形1311与矩形1312间存在碰撞,因此,地图内容对象A与地图内容对象B之间存在内容遮挡。
在实际应用场景中,某些地图内容对象的显示位置是可以挪动的(例如,文字注记内 容),当可以挪动位置的地图内容对象被遮挡时,其可以通过挪动位置来避免被遮挡。因此,在本申请一实施例中,冲突解决策略包括针对可以挪动位置的地图内容对象的图层内容避让策略,在图层内容避让策略中,通过避让布局解决地图内容对象被遮挡的问题。
具体的,以文字对象为例,如图14所示,文字A的最小外部矩形为矩形1400,当文字A被遮挡或遮挡其他地图内容对象时,以文字中心点A 0(文字A的最小外部矩形的中心点(Center(x,y)))为基准,文字可以向位置1401(文字(上))、位置1402(文字(下))、位置1403(文字(左))、位置1404(文字(右))四个方向移动。例如,将文字向位置1404(文字(右))移动,最终文字的最小外部矩形为矩形1410,矩形1410的四个顶点的坐标为(minX,minY)、(maxX,minY)、(minX,maxY)、(maxX,maxY)。具体的,在一应用场景中,可以默认将文字向1404(文字(右))移动,如果右侧存在遮挡则向左侧(1403)/上方(1401)/下方(1402)移动。
进一步的,在实际应用场景中,某些地图内容对象的显示位置是不可以挪动的(例如,代表固定位置建筑物的图标)。因此,在本申请一实施例中,冲突解决策略还包括针对不可以挪动位置的地图内容对象的图层内容隐藏策略,在图层内容隐藏策略中,通过不显示被遮挡的地图内容对象解决因地图内容对象被部分遮挡而导致的呈现效果凌乱的问题,以及,降低显示内存消耗。
例如,图15所示为根据本申请一实施例的基于冲突检测的图层渲染流程示意图。如图15所示,针对电子地图A中的每一个图层(用户数据图层a、基础数据图层a 1、基础数据图层a 2、…、基础数据图层a n)中可能存在内容遮挡的所有地图内容对象,进行冲突检测(步骤1510)。在步骤1510中,进行碰撞计算,以确认存在内容遮挡的地图内容对象。
针对存在内容遮挡的、可移动的地图内容对象(例如,文字),进行避让布局(例如,默认移动文字到右侧,如果右侧存在遮挡则放在左侧/上方/下方);针对被遮挡的不可移动的地图内容对象(例如,建筑物图标),将地图内容对象标记出来。最终生成用户数据图层a 1、基础数据图层a 1 1、基础数据图层a 1 2、…、基础数据图层a 1 n
对用户数据图层a 1、基础数据图层a 1 1、基础数据图层a 1 2、…、基础数据图层a 1 n进行分层渲染(分层渲染a 1、分层渲染a 1 1、分层渲染a 1 2、…、分层渲染a 1 n)。在分层渲染时,对已标记的地图内容对象不再显示,其他地图内容对象正常显示。
进一步的,在实际应用场景中,图层间的显示冲突还包括内容重复。例如,如图12所示,用户数据图层中标记框1202中的商家标记“吉彩体育馆”,与下方基础数据图层中建筑名称“吉彩体育馆”重复,这就导致电子地图所显示的地图内容出现冗余内容,使得电子地图的呈现效果变得杂乱,大大影响用户的视觉体验。
针对内容重复,在本申请一实施例中,基于内容识别进行冲突检测。具体的,针对所有图层中的文字内容(例如,文字注记内容、包含文字的图标/图片)进行内容识别,对比不同文字内容的识别结果,以确定地图内容对象之间是否存在内容重复。针对内容重复,冲突解决策略包括,隐藏内容重复的一方(例如,默认为隐藏用户数据图层的地图内容对象)。例如,隐藏用户数据图层中标记框1202中的商家标记“吉彩体育馆”。
具体的,如图15所示,在步骤1510中,针对电子地图中的所有图层(用户数据图层a、基础数据图层a 1、基础数据图层a 2、…、基础数据图层a n)的文字内容进行内容识别 以及内容对比,以确认存在内容重复的地图内容对象。针对存在内容重复的地图内容对象,将在用户数据图层的内容重复的地图内容对象标记出来。在分层渲染(分层渲染a 1、分层渲染a 1 1、分层渲染a 1 2、…、分层渲染a 1 n)时,对已标记的地图内容对象不再显示,其他地图内容对象正常显示。
根据图15所示实施例的方法,基础数据图层和用户数据图层一起参与冲突检测,然后分层渲染输出,可以有效解决跨图层的内容冲突问题,保证用户数据图层的加入不影响整个电子地图的浏览体验。
图16所示为根据本申请一实施例的地图显示流程图。电子地图显示系统执行如图16所示的下述步骤以实现电子地图的显示:
步骤1600,创建地图实例,例如,调用地图SDK/API方法创建地图实例对象;比如,采用下述代码字段:
var Hmap=new mapsdk.Map(document.getElementById(“Huaweimap”),mapOptions);
步骤1610,创建用户数据图层(CustomLayer,CL)并添加到地图实例对象上面;
步骤1611,基于自定义样式配置CL的样式,自定义样式由样式编辑器生成;
比如,针对渲染API/SDK设置如下代码:
var Hmap=new mapsdk.Map(document.getElementById(“Huaweimap”),mapOptions);
var customLayer=new mapsdk.CustomLayer(…);
Hmap.addTileLayer(customLayer);
customLayer.setStyle({
      styleID:‘xxxx’
});
上述代码中,使用样式ID为xxxx的自定义样式配置用户数据图层(CustomLayer);
步骤1620,配置基础数据图层的样式(或者,不进行配置处理,使用默认样式);
步骤1630,设定所有图层的内容显示策略,针对每一个图层(基础数据图层以及用户数据图层),根据需要设定相应的内容显示策略;比如,图层内容隐藏策略(设置某些POI类别不显示),和/或,图层内容显示密度(调节某个图层的内容显示密度);例如,针对渲染API/SDK设置如下代码:
customLayer.setDensity(0.6);
上述代码中,用户数据图层(CustomLayer)的显示密度被配置为0.6。
步骤1640,冲突检测,渲染引擎需对所有数据图层进行冲突检测,保证图层间内容不出现因遮挡影响可读性的问题(比如道路上的文字和POI文字不重叠在一起,POI的图标之间不重叠等),以及,保证图层间内容不出现因内容重复导致影响呈现效果的问题(比如道路上的文字和POI文字不重复等);
步骤1650,逐层渲染输出,渲染引擎逐层进行渲染输出,生成最终需要的地图数据(地图数据被输出到显示模块进行显示)。
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。
进一步的,在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改 进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由访问方对器件编程来确定。由设计人员自行编程来把一个数字装置“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
因此,基于本申请一实施例中提出的地图显示方法,本申请一实施例还提出了一种地图显示装置。该地图显示装置安装在可以显示电子地图的本地终端(例如,手机)或者可以为用户终端提供电子地图服务的服务器(例如,云端地图服务器)中,地图显示装置包括:
自定义样式获取模块,其用于获取自定义样式;
地图调用模块,其用于调用地图实例对象,地图实例对象包括一个或多个基础数据图层;
图层创建模块,其用于创建用户图层;
地图生成模块,其用于将用户数据图层添加到地图实例对象,以生成用于地图显示的地图数据,地图生成模块包括:
图层配置单元,其用于基于自定义样式配置用户数据图层。
基于本申请一实施例中提出的地图显示方法,本申请一实施例还提出了另一种地图显示装置。该地图显示装置安装在可以显示电子地图的本地终端(例如,手机)或者可以为用户终端提供电子地图服务的服务器(例如,云端地图服务器)中,地图显示装置包括:
地图调用模块,其用于调用地图实例对象,地图实例对象包括一个或多个基础数据图层;
图层创建模块,其用于创建用户图层;
地图生成模块,其用于将用户数据图层添加到地图实例对象,以生成用于地图显示的地图数据,地图生成模块包括:
冲突检测单元,其用于对基础数据图层以及用户数据图层进行冲突检测,以获取检测结果,检测结果用于描述用户数据图层与基础数据图层之间的显示冲突;
冲突解决策略获取单元,其用于根据检测结果,设定针对基础数据图层和/或用户数据图层的冲突解决策略,冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略;
图层配置单元,其用于基于冲突解决策略配置基础数据图层和/或用户数据图层。
在本申请实施例的描述中,为了描述的方便,描述装置时以功能分为各种模块/单元分别描述,各个模块/单元的划分仅仅是一种逻辑功能的划分,在实施本申请实施例时可以把各模块/单元的功能在同一个或多个软件和/或硬件中实现。
具体的,本申请实施例所提出的装置在实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个数字信号处理器(Digital Singnal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,这些模块可以集成在一起,以片上装置(System-On-a-Chip,SOC)的形式实现。
本申请一实施例还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发电子设备执行如本申请实施例所述的方法步骤。
具体的,在本申请一实施例中,上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述设备执行时,使得上述设备执行本申请实施例所述的方法步骤。
具体的,在本申请一实施例中,电子设备的处理器可以是片上装置SOC,该处理器中可以包括中央处理器(Central Processing Unit,CPU),还可以进一步包括其他类型的处理器。具体的,在本申请一实施例中,电子设备的处理器可以是PWM控制芯片。
具体的,在本申请一实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或 数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units,NPU)和图像信号处理器(Image Signal Processing,ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。
具体的,在本申请一实施例中,电子设备的存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何计算机可读介质。
具体的,在本申请一实施例中,处理器可以和存储器可以合成一个处理装置,更常见的是彼此独立的部件,处理器用于执行存储器中存储的程序代码来实现本申请实施例所述方法。具体实现时,该存储器也可以集成在处理器中,或者,独立于处理器。
进一步的,本申请实施例阐明的设备、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
具体的,本申请一实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。
本申请一实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。
本申请中的实施例描述是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框 或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
还需要说明的是,本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。
本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以意识到,本申请实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。

Claims (12)

  1. 一种地图显示方法,其特征在于,包括:
    调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
    调用用户数据图层,其中,所述用户数据图层为根据用户地图数据所创建的图层;
    将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,包括:
    基于自定义样式配置所述用户数据图层。
  2. 根据权利要求1所述的方法,其特征在于,所述自定义样式由样式编辑器生成,生成所述自定义样式的过程包括:
    选择图层类型,所述图层类型包括点图层、和/或线图层、和/或面图层;
    对图层样式进行自定义,包括,设定图层使用的图标、图层内容的字体、图层内容的形态。
  3. 根据权利要求1所述的方法,其特征在于,所述将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,还包括:
    基于内容显示策略配置所述用户数据图层和/或所述基础数据图层,其中,所述内容显示策略包括图层内容隐藏策略和/或图层内容显示密度。
  4. 根据权利要求1~3中任一项所述的方法,其特征在于,所述将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,还包括:
    对所述基础数据图层以及所述用户数据图层进行显示冲突检测,以获取检测结果,所述检测结果用于描述所述用户数据图层与所述基础数据图层之间的显示冲突;
    根据所述检测结果,设定冲突解决策略;
    基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
  5. 根据权利要求4所述的方法,其特征在于,所述显示冲突包括内容遮挡和/或内容重复。
  6. 根据权利要求4所述的方法,其特征在于,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略。
  7. 一种地图显示方法,其特征在于,包括:
    调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
    创建用户数据图层;
    将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,包括:
    对所述基础数据图层以及所述用户数据图层进行显示冲突检测,以获取检测结果;
    根据所述检测结果,设定冲突解决策略,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略;
    基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
  8. 一种地图显示装置,其特征在于,包括:
    自定义样式获取模块,其用于获取自定义样式;
    地图调用模块,其用于调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
    图层创建模块,其用于创建用户图层;
    地图生成模块,其用于将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,所述地图生成模块包括:
    图层配置单元,其用于基于所述自定义样式配置所述用户数据图层。
  9. 一种地图显示装置,其特征在于,包括:
    地图调用模块,其用于调用地图实例对象,所述地图实例对象包括一个或多个基础数据图层;
    图层创建模块,其用于创建用户图层;
    地图生成模块,其用于将所述用户数据图层添加到所述地图实例对象,以生成用于地图显示的地图数据,所述地图生成模块包括:
    冲突检测单元,其用于对所述基础数据图层以及所述用户数据图层进行冲突检测,以获取检测结果,所述检测结果用于描述所述用户数据图层与所述基础数据图层之间的显示冲突;
    冲突解决策略获取单元,其用于根据所述检测结果,设定针对所述基础数据图层和/或所述用户数据图层的冲突解决策略,所述冲突解决策略包括图层内容隐藏策略和/或图层内容避让策略;
    图层配置单元,其用于基于所述冲突解决策略配置所述基础数据图层和/或所述用户数据图层。
  10. 一种电子设备,其特征在于,所述电子设备包括显示设备用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述电子设备执行如权利要求1~6中任一项所述的方法步骤。
  11. 一种电子设备,其特征在于,所述电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述电子设备执行如权利要求7所述的方法步骤。
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-7中任一项所述的方法。
PCT/CN2021/143531 2021-02-08 2021-12-31 一种地图显示方法、装置和电子设备 WO2022166496A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21924489.4A EP4273715A4 (en) 2021-02-08 2021-12-31 METHOD AND APPARATUS FOR DISPLAY, AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110182916.3 2021-02-08
CN202110182916.3A CN114911883A (zh) 2021-02-08 2021-02-08 一种地图显示方法、装置和电子设备

Publications (1)

Publication Number Publication Date
WO2022166496A1 true WO2022166496A1 (zh) 2022-08-11

Family

ID=82740819

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143531 WO2022166496A1 (zh) 2021-02-08 2021-12-31 一种地图显示方法、装置和电子设备

Country Status (3)

Country Link
EP (1) EP4273715A4 (zh)
CN (1) CN114911883A (zh)
WO (1) WO2022166496A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795347A (zh) * 2023-06-30 2023-09-22 兰州交通大学 一种面向地图自动综合的图形化编程系统及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060174209A1 (en) * 1999-07-22 2006-08-03 Barros Barbara L Graphic-information flow method and system for visually analyzing patterns and relationships
CN102063833A (zh) * 2010-12-17 2011-05-18 中国科学院计算技术研究所 一种地图点图层符号和注记同步显示的绘制方法
CN106373176A (zh) * 2016-09-23 2017-02-01 上海图聚智能科技股份有限公司 通过lua配置地图样式的方法
CN109710704A (zh) * 2018-11-30 2019-05-03 武汉烽火众智智慧之星科技有限公司 一种电子地图显示方法及装置
CN110610535A (zh) * 2019-08-19 2019-12-24 武大吉奥信息技术有限公司 基于矢量数据的可配置前端纯js地图动画集实现方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8671355B2 (en) * 2007-10-05 2014-03-11 Mapquest, Inc. Methods and systems for decluttering icons representing points of interest on a map
US11037256B2 (en) * 2019-04-26 2021-06-15 Mapbox, Inc. Editing and representing property values for a digital map

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060174209A1 (en) * 1999-07-22 2006-08-03 Barros Barbara L Graphic-information flow method and system for visually analyzing patterns and relationships
CN102063833A (zh) * 2010-12-17 2011-05-18 中国科学院计算技术研究所 一种地图点图层符号和注记同步显示的绘制方法
CN106373176A (zh) * 2016-09-23 2017-02-01 上海图聚智能科技股份有限公司 通过lua配置地图样式的方法
CN109710704A (zh) * 2018-11-30 2019-05-03 武汉烽火众智智慧之星科技有限公司 一种电子地图显示方法及装置
CN110610535A (zh) * 2019-08-19 2019-12-24 武大吉奥信息技术有限公司 基于矢量数据的可配置前端纯js地图动画集实现方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4273715A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795347A (zh) * 2023-06-30 2023-09-22 兰州交通大学 一种面向地图自动综合的图形化编程系统及装置
CN116795347B (zh) * 2023-06-30 2024-06-04 兰州交通大学 一种面向地图自动综合的图形化编程系统及装置

Also Published As

Publication number Publication date
EP4273715A1 (en) 2023-11-08
EP4273715A4 (en) 2024-07-03
CN114911883A (zh) 2022-08-16

Similar Documents

Publication Publication Date Title
CN108984604B (zh) 场地地图应用和系统
KR101962394B1 (ko) 맵 지형지물의 현저성-기반 발생 및 렌더링
CN109074376A (zh) 绘图接口中的上下文墨迹标注
US10422654B2 (en) Devices and methods for comparing and selecting alternative navigation routes
CN106797547B (zh) 操作系统对位置卡的支持
US9134886B2 (en) Providing indoor facility information on a digital map
US20150170616A1 (en) Local data quality heatmap
JP2005515513A (ja) 概略図の生成
KR102004175B1 (ko) 3차원 지도 제공 장치 및 방법
JP2020533617A (ja) デジタルマップ上のインジケータの視覚的なプロパティを動的に変更すること
CN106373176B (zh) 通过lua配置地图样式的方法
WO2022166496A1 (zh) 一种地图显示方法、装置和电子设备
US20190311509A1 (en) Generation and presentation of distance cartograms
US20230168106A1 (en) Method, apparatus, and system for providing mock map data for map design validation and documentation
Liu et al. Game engine-based point cloud visualization and perception for situation awareness of crisis indoor environments
KR20140078083A (ko) 증강 현실이 구현된 만화책
LOPEZ AUGMENTED REALITY FOR DISSEMINATING CULTURAL AND HISTORICAL HERITAGE AT CEMITÉRIO DOS PRAZERES
Mang Towards improving instruction presentation for indoor navigation
Xia et al. Web-Based Mapping and Visualization Packages
Werkmann MapCube: A Mobile Focus & Context Information Visualization Technique for Geographic Maps
CN116499483A (zh) 一种用于呈现路线指引的方法、设备及介质
CN116027949A (zh) 展示地图的方法及相关设备
Ricker et al. CV-40-Mobile Maps and Responsive Design
Hodzic TRPINAV: A System for Terrain, Route, Points of Interest and Navigation
Morgan Placing street labels in interactive navigational maps

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21924489

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021924489

Country of ref document: EP

Effective date: 20230801

NENP Non-entry into the national phase

Ref country code: DE