U.S. patent application number 15/681286 was filed with the patent office on 2018-02-22 for providing visual selection of map data for a digital map.
The applicant listed for this patent is Mapbox, Inc.. Invention is credited to Scott Andrews, Saman Bemel-Benrud, Eden Halperin, Thomas Christopher MacWright.
Application Number | 20180052593 15/681286 |
Document ID | / |
Family ID | 61191591 |
Filed Date | 2018-02-22 |
United States Patent
Application |
20180052593 |
Kind Code |
A1 |
Bemel-Benrud; Saman ; et
al. |
February 22, 2018 |
PROVIDING VISUAL SELECTION OF MAP DATA FOR A DIGITAL MAP
Abstract
A process, and corresponding system for performing the process,
is described herein for visually distinguishing selection of map
style layer data. The process displays source map data layer
information from a style sheet for a digital map and corresponding
visual map layers. Upon selection of a particular source map data
layer, features of the visual map layers defined by the selected
particular source map data layer are visually distinguished in the
display of the visual map layers. The process determines the source
map data layer information and determines whether the selected
particular source map data layer has corresponding features in the
visual map layers for display, and if so, visually distinguishes
those features in the visual map. As updates are made to the source
map data layer information for the selected particular source map
data layer, the visual map is updated to reflect the changes.
Inventors: |
Bemel-Benrud; Saman;
(Washington, DC) ; MacWright; Thomas Christopher;
(Washington, DC) ; Halperin; Eden; (San Francisco,
CA) ; Andrews; Scott; (San Francisco, CA) |
|
Applicant: |
Name |
City |
State |
Country |
Type |
Mapbox, Inc. |
San Francisco |
CA |
US |
|
|
Family ID: |
61191591 |
Appl. No.: |
15/681286 |
Filed: |
August 18, 2017 |
Related U.S. Patent Documents
|
|
|
|
|
|
Application
Number |
Filing Date |
Patent Number |
|
|
62376868 |
Aug 18, 2016 |
|
|
|
Current U.S.
Class: |
1/1 |
Current CPC
Class: |
G06F 3/04847 20130101;
G09B 29/003 20130101; G06F 16/287 20190101; G06T 2200/24 20130101;
G06T 11/60 20130101; G06F 2203/04806 20130101; G06F 3/0482
20130101; G06F 16/2379 20190101; G01C 21/367 20130101; G06F 3/0486
20130101; G06T 11/206 20130101; G06F 16/29 20190101; G06F 3/04845
20130101; G06F 3/04847 20130101; G06F 3/04845 20130101; G06F 3/0482
20130101; G06F 3/0486 20130101; G06F 16/29 20190101; G06F 16/287
20190101; G06F 16/2379 20190101; G06F 2203/04806 20130101; G06T
11/60 20130101; G06T 11/206 20130101; G06T 2200/24 20130101; G01C
21/367 20130101; G09B 29/003 20130101 |
International
Class: |
G06F 3/0484 20060101
G06F003/0484; G06F 17/30 20060101 G06F017/30; G06T 11/60 20060101
G06T011/60; G06T 11/20 20060101 G06T011/20 |
Claims
1. A method of visually distinguishing selection of map style layer
data comprising: displaying source map data layer information from
a style sheet for a digital map; displaying visual map layers
corresponding to the source map data layer information; receiving a
request to select a particular source map data layer; visually
distinguishing, in the display of the visual map layers, any
features of the visual map layers defined by the selected
particular source map data layer.
2. The method of claim 1, further comprising: determining the
source map data layer information specified by the selected source
map style layer; determining whether the selected particular source
map data layer has corresponding features in the visual map layers
for display; and wherein visually distinguishing the features in
the display of the visual map layers is in response to the selected
particular source map data layer having corresponding features in
the visual map layers.
3. The method of claim 1, further comprising, in response to the
selected particular source map data layer having no corresponding
features in the visual map layers for display, not visually
distinguishing any visual map layers features.
4. The method of claim 1, further comprising: receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer; and re-rendering the
display of the visual map layers, wherein updated features defined
by the updated source map data layer information for the selected
particular source map data layer are visually distinguished in the
re-rendered display.
5. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: receiving input
specifying applying one or more style layer filters; and wherein
visually distinguishing in the display of the visual map layers any
features of the visual map layers defined by the selected
particular source map data layer comprises removing from the visual
map layers one or more visually distinguished features based on the
filtering.
6. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: removing one or
more style layer filters; and wherein visually distinguishing in
the display of the visual map layers any features of the visual map
layers defined by the selected particular source map data layer
comprises adding to the visual map one or more new visually
distinguished features corresponding to the removed filter.
7. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: receiving input
specifying an updated source map data layer for the particular
style layer; removing from the display of the visual map the
visually distinguished features defined by the source map data
layer; and adding to the display of the visual map one or more
updated visually distinguished features defined by the updated
source map data layer.
8. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: receiving input
specifying an updated style layer type; and updating the visual
map, wherein a shape of one or more features of the updated visual
map is based on the updated style layer type.
9. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: receiving a
request to create a new style layer; receiving a selection of a
source map data layer information for the new style layer; and
wherein re-rendering the display of the visual map layers displays
updated features defined by the source map data layer information
for the new style layer that are visually distinguished in the
re-rendered display.
10. The method of claim 1, wherein receiving input specifying an
update to the source map data layer information for the selected
particular source map data layer further comprises: receiving input
specifying an updated zoom level at which to view the visual map;
and wherein re-rendering the display of the visual map layers
displays updated features based on the updated zoom level.
11. The method of claim 1, wherein visually distinguishing the
features further comprises applying a color to the features, the
color chosen from a plurality of available colors corresponding to
the source map data layer that specified by the particular style
layer.
12. The method of claim 1, wherein visually distinguishing the
features further comprises applying a shape to the features, the
shape chosen from a plurality of different available shapes
corresponding to a style layer type of the particular style
layer.
13. The method of claim 1, wherein visually distinguishing the
features comprises de-emphasizing any map features not specified by
the selected particular style layer.
14. A server computer comprising: one or more processors; a memory
coupled to the one or more processors and storing program
instructions which, when executed using the one or more processors,
cause the one or more processors to perform: displaying source map
data layer information from a style sheet for a digital map;
displaying visual map layers corresponding to the source map data
layer information; receiving a request to select a particular
source map data layer; visually distinguishing, in the display of
the visual map layers, any features of the visual map layers
defined by the selected particular source map data layer.
15. The server computer of claim 14, the program instructions
which, when executed by the one or more processors, further cause
the one or more processors to perform: determining the source map
data layer information specified by the selected source map style
layer; determining whether the selected particular source map data
layer has corresponding features in the visual map layers for
display; and wherein visually distinguishing the features in the
display of the visual map layers is in response to the selected
particular source map data layer having corresponding features in
the visual map layers.
16. The server computer of claim 14, the program instructions
which, when executed by the one or more processors, further cause
the one or more processors to perform, in response to the selected
particular source map data layer having no corresponding features
in the visual map layers for display, not visually distinguishing
any visual map layers features.
17. The server computer of claim 14, the program instructions
which, when executed by the one or more processors, further cause
the one or more processors to perform: receiving input specifying
an update to the source map data layer information for the selected
particular source map data layer; and re-rendering the display of
the visual map layers, wherein updated features defined by the
updated source map data layer information for the selected
particular source map data layer are visually distinguished in the
re-rendered display.
18. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
receiving input specifying applying one or more style layer
filters; and wherein visually distinguishing in the display of the
visual map layers any features of the visual map layers defined by
the selected particular source map data layer comprises removing
from the visual map layers one or more visually distinguished
features based on the filtering.
19. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
removing one or more style layer filters; and wherein visually
distinguishing in the display of the visual map layers any features
of the visual map layers defined by the selected particular source
map data layer comprises adding to the visual map one or more new
visually distinguished features corresponding to the removed
filter.
20. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
receiving input specifying an updated source map data layer for the
particular style layer; removing from the display of the visual map
the visually distinguished features defined by the source map data
layer; and adding to the display of the visual map one or more
updated visually distinguished features defined by the updated
source map data layer.
21. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
receiving input specifying an updated style layer type; and
updating the visual map, wherein a shape of one or more features of
the updated visual map is based on the updated style layer
type.
22. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
receiving a request to create a new style layer; receiving a
selection of a source map data layer information for the new style
layer; and wherein re-rendering the display of the visual map
layers displays updated features defined by the source map data
layer information for the new style layer that are visually
distinguished in the re-rendered display.
23. The server computer of claim 14, wherein receiving input
specifying an update to the source map data layer information for
the selected particular source map data layer further comprises:
receiving input specifying an updated zoom level at which to view
the visual map; and wherein re-rendering the display of the visual
map layers displays updated features based on the updated zoom
level.
24. The server computer of claim 14, wherein visually
distinguishing the features further comprises applying a color to
the features, the color chosen from a plurality of available colors
corresponding to the source map data layer that specified by the
particular style layer.
25. The server computer of claim 14, wherein visually
distinguishing the features further comprises applying a shape to
the features, the shape chosen from a plurality of different
available shapes corresponding to a style layer type of the
particular style layer.
26. The server computer of claim 14, wherein visually
distinguishing the features comprises de-emphasizing any map
features not specified by the selected particular style layer.
27. A computer-readable memory storing a computer program
executable by a processor, the computer program producing a user
interface, the user interface comprising: a source user interface
portion displaying source map data layer information from a style
sheet for a digital map, the source user interface portion
including a plurality of controls for selecting and editing the
source map data layer information, a visual map user interface
portion displaying visual map layers corresponding to the source
map data layer information; and in response to receiving selection
of a particular source map data layer in the source user interface
portion, wherein the visual map user interface portion displays an
indication of features of visual map layers defined by the
particular source map data layer selected, the features visually
distinguished in the display of the visual map layers.
Description
BENEFIT CLAIM
[0001] This application claims the benefit of provisional
application 62/376,868, filed Aug. 18, 2016, the entire contents of
which is hereby incorporated by reference as if fully set forth
herein, under 35 U.S.C. .sctn. 119(e). This application also is
related to non-provisional applications: Ser. No. 15/______,
entitled "Representation of Digital Map Properties Across Zoom
Levels," Ser. No. 15/______, entitled "Modifying Style Layer
Properties of a Digital Map," and Ser. No. 15/______, entitled
"Providing Graphical Indication of Label Boundaries in Digital
Maps," each of which were filed on Aug. 18, 2017, and the entire
contents of each is hereby incorporated by reference as if fully
set forth herein.
BACKGROUND
[0002] While digital maps and graphical user interfaces for digital
maps have entered wide use, creating such maps and interfaces is
difficult using pre-existing software tools. Editing and authoring
programs for creating digital map templates, colors, and features
has been complex and required many manual operations. In
particular, processes for customizing digital maps, or preparing
digital maps in a manner that can adapt to other applications that
use the maps, has been difficult or inconvenient. Therefore, there
is a need for more flexible, comprehensive and convenient
computer-based techniques for creating, modifying and manipulating
digital maps and graphical user interfaces for digital computer
display devices that display maps.
SUMMARY
[0003] As described herein, electronic map data is divided into a
plurality of vector map tiles at a plurality of zoom levels,
wherein each map tile corresponds to a portion of a geographic map.
The map tiles are rendered when requested by a client, and each map
tile is rendered based on one or more map styles, which defines the
visual appearance of an electronic map, such as what map data to
display in the electronic map, what order to render the data in,
and how to style the data when it is rendered.
[0004] A map style comprises one or more map style layers, each of
which may include a reference to a portion of electronic map data
and one or more visual style rules to be applied to the portion of
electronic map data. Map editing instructions are programmed or
configured to cause display, in a graphical user interface of a
computer display device and in association with a digital map, of
one or more style layer properties of the digital map.
[0005] A process, and corresponding system for performing the
process, is described herein for visually distinguishing selection
of map style layer data. The process displays source map data layer
information from a style sheet for a digital map and corresponding
visual map layers. Upon selection of a particular source map data
layer, features of the visual map layers defined by the selected
particular source map data layer are visually distinguished in the
display of the visual map layers. The process determines the source
map data layer information and determines whether the selected
particular source map data layer has corresponding features in the
visual map layers for display, and if so, visually distinguishes
those features in the visual map. As updates are made to the source
map data layer information for the selected particular source map
data layer, the visual map is updated to reflect the changes.
BRIEF DESCRIPTION OF THE DRAWINGS
[0006] In the drawings:
[0007] FIG. 1A illustrates an example computer system in which the
techniques described herein may be practiced, according to an
embodiment.
[0008] FIG. 1B illustrates a computer system upon which an
embodiment may be implemented.
[0009] FIG. 2 illustrates a map style editor according to an
embodiment.
[0010] FIG. 3 illustrates an example visual selection corresponding
to a map style layer, according to an embodiment.
[0011] FIG. 4 illustrates a new style layer editor of a map style
editor, according to an embodiment.
[0012] FIG. 5 illustrates an example visual selection corresponding
to a map style layer, according to an embodiment.
[0013] FIG. 6 illustrates an example visual selection corresponding
to a map style layer after changing a map style layer type,
according to an embodiment.
[0014] FIG. 7A illustrates an example visual selection without a
style layer filter, according to an embodiment.
[0015] FIG. 7B illustrates an example visual selection after adding
a style layer filter, according to an embodiment.
[0016] FIG. 8 illustrates a flowchart of a process for visually
distinguishing selection of map style layer data, according to an
embodiment.
DETAILED DESCRIPTION
[0017] In the following description, for the purposes of
explanation, numerous specific details are set forth in order to
provide a thorough understanding of the present invention. It will
be apparent, however, that the present invention may be practiced
without these specific details. In other instances, well-known
structures and devices are shown in block diagram form in order to
avoid unnecessarily obscuring the present invention.
[0018] The text of this disclosure, in combination with the drawing
figures, is intended to state in prose the algorithms that are
necessary to program a computer to implement the claimed
inventions, at the same level of detail that is used by people of
skill in the arts to which this disclosure pertains to communicate
with one another concerning functions to be programmed, inputs,
transformations, outputs and other aspects of programming. That is,
the level of detail set forth in this disclosure is the same level
of detail that persons of skill in the art normally use to
communicate with one another to express algorithms to be programmed
or the structure and function of programs to implement the
inventions claimed herein.
System Overview
[0019] FIG. 1A illustrates an example computer system in which the
techniques described may be practiced, according to one
embodiment.
[0020] In an embodiment, a computer system 100 comprises a
plurality of components that may be implemented at least partially
by hardware at one or more computing devices, such as one or more
hardware processors executing stored program instructions stored in
one or more memories for performing the functions that are
described herein. In other words, in an embodiment, all functions
described herein are intended to indicate operations that are
performed using programming in a special-purpose computer or
general-purpose computer, in various embodiments. FIG. 1A
illustrates only one of many possible arrangements of components
configured to execute the programming described herein. Other
arrangements may include fewer or different components, and the
division of work between the components may vary depending on the
arrangement.
[0021] FIG. 1A illustrates a client computing device 145 that is
coupled via a network connection 165 to a server computer 105,
which is coupled to a database 120. The server computer comprises a
mapping application 110, an application programming interface (API)
112, map editing instructions 115, and a database interface 117.
The database 120 comprises electronic map source data 125,
electronic map data 130, and map style data 140. The client
computing device 145 comprises a client map application 150,
browser 155, and wireless network interface 159.
[0022] In one embodiment, client computing device 145 is any
computing device, such as a work station, personal computer,
general purpose computer, laptop, hand-held computer, wearable
computer, cellular or mobile phone, portable digital assistant
(PDA), tablet computer, and the like. Although a single client
computing device is depicted in FIG. 1A, any number of client
computing devices may be present. Each client computing device 145
is communicatively connected to server computer 105 through network
connection 165 which comprises any combination of a LAN, a WAN, one
or more internetworks such as the public Internet, a cellular
network, or a company network.
[0023] Client computing device 145 also includes network interface
159, which is used by the client computing device 145 to
communicate with other devices. In particular, network interface
159 is used to establish network connection 165 to server computer
105. Network interface 159 may use Ethernet, WiFi, WiMAX,
Bluetooth, ZigBee, cellular standards, or others.
[0024] Client computing device 145 also includes other hardware
elements, such as one or more input devices, memory, processors,
and the like, which are not depicted in FIG. 1A. Client computing
device 145 also includes applications, software, and other
executable instructions to facilitate various aspects of
embodiments described herein. These applications, software, and
other executable instructions may be installed by a user, owner,
manufacturer, or other entity related to the client computing
device.
[0025] In one embodiment, client computing device 145 includes
client map application 155 which is software that displays, uses,
supports, or otherwise provides electronic mapping functionality as
part of the application or software. Client map application 155 may
be any type of application, such as a taxi service, a video game, a
chat client, a food delivery application, etc. In an embodiment,
client map application 155 obtains electronic mapping functions
through SDK 157, which may implement functional calls, callbacks,
methods, or other programmatic means for contacting the server
computer to obtain digital map tiles, layer data, or other data
that can form the basis of visually rendering a map as part of the
application. In general, SDK 157 is a software development kit that
allows developers to implement electronic mapping without having to
design all of the components from scratch. For example, SDK 157 may
be downloaded from the Internet by developers, and subsequently
incorporated into an application which is later used by individual
users.
[0026] In one embodiment, client computing device 145 includes
browser 155. Browser 155 is a computer application that may request
and execute instructions received from web servers to generate
complex user interfaces that are presented to a user through one or
more devices, such as a display or speakers. In response to input
from a user, such as a mouse click indicating that the user
selected an object defined in the instructions, such as a button or
a text box, a browser may send a request based on the selected
object to the web server. The request may be a request for data or
include data to be processed by the web server. In an embodiment,
browser 155 may receive instructions from server computer 105 to
generate a user interface of a map editing program through which a
user may create and modify map styles. Additionally or
alternatively, client computing device 145 may include a map
editing application or software that provides map editing functions
as part of the application or software.
[0027] Server computer 105 may be any computing device, including
but not limited to: servers, racks, work stations, personal
computers, general purpose computers, laptops, Internet appliances,
wireless devices, wired devices, multi-processor systems,
mini-computers, and the like. Although FIG. 1A shows a single
element, the server computer 105 broadly represents one or more
multiple server computers, such as a server cluster, and the server
computer 105 may be located in one or more physical locations.
Server computer 105 may also represent one or more virtual
computing instances that execute using one or more computers in a
datacenter such as a virtual server farm.
[0028] Server computer 105 is communicatively connected to database
120 and client computer device 145 through any kind of computer
network using any combination of wired and wireless communication,
including, but not limited to: a Local Area Network (LAN), a Wide
Area Network (WAN), one or more internetworks such as the public
Internet, or a company network. Server computer 105 may host or
execute mapping application 110, and may include other
applications, software, and other executable instructions, such as
database interface 117, to facilitate various aspects of
embodiments described herein.
[0029] In one embodiment, database interface 117 is a programmatic
interface such as JDBC or ODBC for communicating with database 120.
Database interface 117 may communicate with any number of databases
and any type of database, in any format. Database interface 117 may
be a piece of customer software created by an entity associated
with mapping application 110, or may be created by a third party
entity in part or in whole.
[0030] In one embodiment, database 120 is a data storage subsystem
consisting of programs and data that is stored on any suitable
storage device such as one or more hard disk drives, memories, or
any other electronic digital data recording device configured to
store data. Although database 120 is depicted as a single device in
FIG. 1A, database 120 may span multiple devices located in one or
more physical locations. For example, database 120 may include one
or nodes located at a data warehouse(s). Additionally, in one
embodiment, database 120 may be located on the same device(s) as
server computer 105. Alternatively, database 120 may be located on
a separate device(s) from server computer 105.
[0031] Database 120 may be in any format, such as a relational
database, a noSQL database, or any other format. Database 120 is
communicatively connected with server computer 105 through any kind
of computer network using any combination of wired and wireless
communication of the type previously described. Optionally,
database 120 may be communicatively connected with other
components, either directly or indirectly, such as one or more
third party data suppliers. Generally, database 120 stores data
related to electronic maps including, but not limited to:
electronic map source data 125, electronic map data 130, map tile
filter 135, and map style data 140. These datasets may be stored as
columnar data in a relational database or as flat files.
[0032] In one embodiment, electronic map source data 125 is raw
digital map data that is obtained, downloaded, or received from a
variety of sources. The raw digital map data may include satellite
images, digital street data, building or place data, or terrain
data. Example sources include National Aeronautics and Space
Administration (NASA), United States Geological Survey (USGS), and
DigitalGlobe. Raw digital map data may also be defined by a user
and uploaded to the server computer. Electronic map source data 125
may be updated at any suitable interval, and may be stored for any
amount of time. Once obtained or received, electronic map source
data 125 is used to generate electronic map data 130.
[0033] In one embodiment, electronic map data 130 is digital map
data that is provided, either directly or indirectly, to client map
applications, such as client map application 155, using an API.
Electronic map data 130 is based on electronic map source data 125.
Specifically, electronic map source data 125 is processed and
organized as a plurality of vector map tiles which may be subject
to map style data to impose different display styles. Electronic
map data 130 may be updated at any suitable interval, and may
include additional information beyond that derived from electronic
map source data 125.
[0034] In an embodiment, electronic map data is divided into a
plurality of vector map tiles at a plurality of zoom levels,
wherein each map tile corresponds to a portion of a geographic map.
For example, a map tile may correspond to a square area of a
geographic map at a particular zoom level, or an area of a
pre-defined size and location within a geographic map. In an
embodiment, the portion of electronic map data within each map tile
may be organized in a compact, structured format, such as the
Mapbox Vector Tile Specification format, by Mapbox, Inc., San
Francisco, Calif. Additionally or alternatively, electronic map
data 130 may comprise a plurality of map tile sets. A first set of
map tiles may include electronic map data derived from a first set
of electronic map source data, while a second set of map tiles may
include electronic map data derived from a second set of electronic
map source data.
[0035] In an embodiment, a map tile contains data describing map
geometries, such as points, lines, and polygons, of features on the
map. Additionally or alternatively, the map tile contains metadata,
such as road names, place names, house numbers, feature types, and
other properties. For example, electronic map data in a vector map
tile corresponding to a portion of a geographic map may include
geometry data representing roads, buildings, water, parks, and etc.
to be depicted within the portion of the geographic map, as well as
geometries for suggested placement of labels and other cartographic
features. The map tile may also include metadata corresponding to
each feature, such as names that can be rendered as labels on a
digital map. Additionally or alternatively, the metadata includes
data indicating the portion of the geographic map that the map tile
corresponds to. For example, the metadata may include data
indicating one or more coordinates of the map tile or one or more
boundaries of the map tile. Additionally or alternatively, the
metadata includes data indicating the zoom level at which that map
tile is to be displayed.
[0036] In an embodiment, electronic map data is further organized
into a plurality of data layers. Electronic map data may describe a
plurality of map features, such as buildings, water, roads, etc.
The map features may be grouped into the plurality of data layers.
For example, a "Road" data layer may include map features such as
streets, bridges, freeways, paths, and etc. As another example, a
"Water" data layer may include map features such as rivers, lakes,
oceans, canals, and etc.
[0037] In an embodiment, map tiles are used by program libraries
and SDKs, such as SDK 157, as part of displaying maps on a mobile
computing device or a browser. A map application or a browser may
request one or more map tiles and process the map tiles to cause
display of a visual map.
[0038] In an embodiment, map tiles are rendered when requested by a
client, like a web browser or a mobile application. Rendering may
be performed by a rendering library of a client map application or
on a server computer. Example rendering libraries include, but are
not limited to, Mapbox GL JS, available from Mapbox, Inc., San
Francisco, Calif., the Mapbox iOS SDK, Mapbox Android SDK, the
Mapbox GL native renderer, or through a Mapbox API.
[0039] In an embodiment, a map tile is rendered based on a map
style. Each map style of a plurality of map styles can be used to
render the same map tile. In other words, the same portion of
electronic map data may be displayed in a variety of visual styles.
For example, in one map application, map tiles may be displayed
with dark colors while in a second map application, map tiles may
be displayed with light colors. Additionally or alternatively, the
electronic map data required may differ based on map style. For
example, in one map application, roads within a map tile may be
displayed while buildings are not displayed. In another map
application, landscape and rivers may be displayed while roads are
not displayed.
[0040] In one embodiment, map style data 140 is digital data that
defines one or more visual map styles for electronic maps. May
style data 140 may comprise a plurality of map styles. A map style
defines the visual appearance of an electronic map, such as what
map data to display in the electronic map, what order to render the
data in, and how to style the data when it is rendered. In an
embodiment, a map style may include information including, but not
limited to, references to portions of electronic map data 130, map
images, fonts, and rules specifying how the portions of electronic
map data 130 should be styled when rendering a digital map, such as
colors, line styles, line thickness, and etc.
[0041] In an embodiment, each map style may be stored as a
document. For example, a map style may be stored as a JSON object
that adheres to a particular style format specification. A map
style may be generated using a map editing program or written
independently and uploaded to a server computer.
[0042] In an embodiment, a map style comprises one or more map
style layers. Each map style layer may include a reference to a
portion of electronic map data and one or more visual style rules
to be applied to the portion of electronic map data. In an
embodiment, the reference to the portion of electronic map data
specifies a particular map data source for the maps style layer.
For example, the map style may specify a particular map tile set
from a plurality of map tile sets as the map data source for the
style layer. Additionally or alternatively, the map style layer may
specify a particular data layer within the map tile set to
associate with the style layer. For example, a style layer may
specify visual style rules for a "Water" data layer of a set of map
tiles.
[0043] In an embodiment, style layer data may include data
indicating a style layer type for a map style layer. A map style
layer may be a particular map style layer type, such as lines,
polygons, symbols, circles, 3D polygons, and images. Additionally
or alternatively, the style layer data may specify property values
for one or more style layer properties associated with the style
layer type. The style layer data may include data indicating
property values to associate with each style layer property. In an
embodiment, a property value may be a static value. Additionally or
alternatively, the property value may be a dynamic value. For
example, the property value may be a zoom level dependent value,
such as a function that outputs a property value based on an input
zoom level.
[0044] Each style layer type has a set of properties for which
values may be specified. For example, a line style layer type may
include style layer properties such as line width, line color, line
style (solid, dotted, dashed), line cap style, line positioning,
etc. As another example, a polygon style layer type may include
style layer properties such as fill color, fill pattern, opacity,
anti-aliasing, fill outline color, polygon positioning, etc.
[0045] In an embodiment, mapping application 110 provides the API
112 that may be accessed, for example, by client map application
155 using SDK 157 to provide electronic mapping to client map
application 155. Specifically, mapping application 110 comprises
program instructions that are programmed or configured to perform a
variety of backend functions needed for electronic mapping
including, but not limited to: receiving map tile requests from
client computing devices, sending electronic map data to client
computing devices, receiving map style data 140 from map editing
applications, receiving electronic map source data 125 from data
providers, processing electronic map source data 125 to generate
electronic map data 130, and any other aspects of embodiments
described herein. Mapping application 110 includes map editing
instructions 115 which are programmed or configured to receive and
store modified map style data. Additionally or alternatively, map
editing instructions 115 may include instructions to perform the
process as detailed in FIG. 8.
[0046] In one embodiment, map editing instructions 115 are
programmed or configured to cause display, in a graphical user
interface of a computer display device and in association with a
digital map, visually distinguished selections of map style layer
data. Map editing instructions 115 may be further programmed or
configured to display source map data layer information from a
style sheet for a digital map and corresponding visual map layers.
Upon selection of a particular source map data layer, features of
the visual map layers defined by the selected particular source map
data layer are visually distinguished in the display of the visual
map layers. Map editing instructions 115 may be further programmed
or configured to determine the source map data layer information
and determines whether the selected particular source map data
layer has corresponding features in the visual map layers for
display, and if so, visually distinguish those features in the
visual map. As updates are made to the source map data layer
information for the selected particular source map data layer, the
visual map is updated to reflect the changes.
[0047] In an embodiment, map editing instructions 115 may include
instructions for causing display of a graphical user interface of a
map editing program at client computing devices. Map editing
instructions 115 may generate and send instructions to browser 155
to generate the graphical user interface. Additionally or
alternatively, map editing instructions 115 may provide data to a
map editing application or other software that provides map editing
functions as part of the application or software. For example, map
editing instructions may send map style data to a map editing
application, receive new or updated map style data, and store
received map style data to map style data 140.
[0048] Map editing instructions 115 may include, for example,
JavaScript for various functions related to visually distinguishing
selections of map style layer data. For example, below is sample
code showing how to take any given stylesheet and create an `x ray`
style from it.
[0049] Initially, toColor and xrayLayers are imported. toColor is a
utility that deterministically assigns colors to layers on the fly.
In short, given an arbitrary string, toColor creates a rbga color
or a specified opacity to identify it visually, using parameters
"str" {string} (any arbitrary string) and "opacity" {number}
(opacity value from 0 to 1). For example, to return an output
color: [0050] toColor(`tom`)//=`rgba(187, 153,68,0.75)`
[0051] xrayLayers is a set of layer templates that xrayify uses
when building the xray style. This code includes functions for
various layer types used in the xray style to build the visual map
with the layer information.
TABLE-US-00001 1 /* @flow */ 2 3 import Immutable from 'immutable';
4 5 const OPAQUE_GRAY = 'rgb(110, 110, 110)'; 6 const FAINT_BLACK =
'rgba(0, 0, 0, 0.4)'; 7 const REGULAR_GRAY = 'rgba(128, 128, 128,
0.3)'; 8 const TRANSPARENT_GRAY = 'rgba(128, 128, 128, 0.1)'; 9
const DIM = true; 10 11 function getTextField(layer: Immutable.Map,
type: string): string { 12 var textField = type === 'point' ? 'No
fields' : ''; 13 if (!layer.get('fields', Immutable.Map(
)).isEmpty( )) { 14 var fieldNames = layer.get('fields').keySeq(
).toList( ); 15 var name = fieldNames.find(field =>
field.match(/{circumflex over ( )}(name|title|label)$/i)); 16 //
for point layer types, fallback to first field if no name or title
17 if (type === 'point' && !name) { 18 name =
fieldNames.first( ); 19 } 20 textField = '{' + name + '}'; 21 } 22
return textField; 23 } 24 25 function raster(source: Immutable.Map,
k: string, dim: boolean, showAll: ?boolean): Object { 26 return ({
27 id: '${source.get('id')}-raster${dim ? '-dim' : ''}', 28
metadata: { 29 'mapbox:dim': !!dim, 30 'mapbox:xray':
source.get('id'), 31 'mapbox:type': 'raster' 32 }, 33 source: k, 34
type: 'raster', 35 paint: { 36 'raster-opacity': showAll ? 0.5 :
dim ? 0.25 : 1 37 } 38 }); 39 } 40 41 function fill(layer:
Immutable.Map, dim: boolean, showAll: ?boolean): Object { 42 return
({ 43 id: '${layer.get('source)}-${1ayer.get('id)}-fill${dim ?
'-dim' : ''}', 44 metadata: { 45 'mapbox:dim': !!dim, 46
'mapbox:xray': layer.get('id'), 47 'mapbox:type': 'fill' 48 }, 49
source: layer.get('source'), 50 'source-layer': layer.get('id'), 51
type: 'fill', 52 paint: { 53 'fill-color': showAll ?
layer.getIn(['color','transparent']) : dim ? TRANSPARENT_ GRAY :
layer.getIn(['color','faint]), 54 'fill-outline-color': showAll ?
layer.getIn(['color','regular']) : dim ? REGULAR_ GRAY :
layer.getIn(['color','opaque']) 55 }, 56 filter: (dim .parallel.
showAll) ? ['==', '$type', 'Polygon'] : ['in', '$type',
'LineString', 'Polygon'] 57 }); 58 } 59 60 function line(layer:
Immutable.Map, dim: boolean, showAll: ?boolean): Object { 61 return
({ 62 id: '${layer.get('source')}-${layer.get('id')}-line${dim ?
'-dim' : ''}', 63 metadata: { 64 'mapbox:dim': !!dim, 65
'mapbox:xray': layer.get('id'), 66 'mapbox:type': 'line' 67 }, 68
source: layer.get('source'), 69 'source-layer': layer.get('id'), 70
type: 'line', 71 paint: { 72 'line-width': (dim .parallel. showAll)
? 1 : 1.5, 73 'line-color': showAll ?
layer.getIn(['color','regular']) : dim ? REGULAR_GRAY:
layer.getIn(['color','opaque']) 74 }, 75 filter: (dim .parallel.
showAll) ? ['==', '$type', 'LineString'] : ['in', '$type',
'LineString', 'Polygon'] 76 }); 77 } 78 79 function lineText(layer:
Immutable.Map, dim: boolean, showAll: ?boolean): Object { 80 return
({ 81 id: '${layer.get('source)}-${layer.get('id')}-linetext${dim ?
'-dim' : ''}', 82 metadata: { 83 'mapbox:dim': !!dim, 84
'mapbox:xray': layer.get('id'), 85 'mapbox:type': 'line' 86 }, 87
source: layer.get('source'), 88 'source-layer': layer.get('id'), 89
type: 'symbol', 90 layout: { 91 'symbol-placement': 'line', 92
'text-ignore-placement': true, 93 'text-allow-overlap': true, 94
'text-font': ['Open Sans Semibold', 'Anal Unicode MS Regular'], 95
'text-field': getTextField(layer, 'line'), 96 'text-size': 10 97 },
98 paint: { 99 text-color': (showAll .parallel. !dim) ?
layer.getIn(['color','opaque'D : OPAQUE_GRAY, 100
'text-halo-color': (showAll .parallel. !dim) ? '#000' :
FAINT_BLACK, 101 'text-halo-width': 1.2 102 }, 103 filter: ['==',
'$type', 'LineString'] 104 }); 105 } 106 107 function point(layer:
Immutable.Map, dim: boolean, showAll: ?boolean): Object { 108
return({ 109 id:
'${layer.get('source')}-${layer.get('id')}-point${dim ? '-dim' :
''}', 110 metadata: { 111 'mapbox:dim': !!dim, 112 'mapbox:xray':
layer.get('id'), 113 'mapbox:type': 'point' 114 }, 115 source:
layer.get('source'), 116 'source-layer': layer.get('id'), 117 type:
'circle', 118 layout: { }, 119 paint: { 120 'circle-radius': (dim
.parallel. showAll) ? 2.5 : 3, 121 'circle-color': (showAll
.parallel. !dim) ? layer.getIn(['color','opaque']) : OPAQUE_GRAY
122 }, 123 filter: (showAll .parallel. dim) ? ['==', '$type',
'Point'] : ['in', '$type', 'Point', 'LineString', 'Polygon'] 124
}); 125 } 126 127 function pointText(layer: Immutable.Map, dim:
boolean, showAll: ?boolean): Object { 128 return { 129 id:
'${layer.get('source')}-${layer.get('id')}-pointtext${dim ? '-dim'
: ''}', 130 metadata: { 131 'mapbox:dim': !!dim, 132 'mapbox:xray':
layer.get('id'), 133 'mapbox:type': 'point' 134 }, 135 source:
layer.get('source'), 136 'source-layer': layer.get('id'), 137 type:
'symbol', 138 layout: { 139 'text-ignore-placement': true, 140
'text-allow-overlap': true, 141 'text-field': getTextField(layer,
'point'), 142 'text-font': ['Open Sans Semibold', 'Anal Unicode MS
Regular'], 143 'text-anchor': 'top', 144 'text-size': 10 145 }, 146
paint: { 147 'text-color': (showAll .parallel. !dim) ?
layer.getIn(['color','opaque']) : OPAQUE_GRAY, 148
'text-halo-color': (showAll .parallel. !dim) ? '#000' :
FAINT_BLACK, 149 'text-halo-width': 1.2 150 }, 151 filter: ['==',
'$type', 'Point'] 152 }; 153 } 154 155 export { 156 DIM, 157
raster, 158 fill, 159 line, 160 lineText, 161 point, 162 pointText
163 };
[0052] Then, importing toColor and xrayLayers, an `x ray` style is
created from a given stylesheet:
TABLE-US-00002 1 /* @flow */ 2 3 import * as xrayLayers from
'./xray_layers'; 4 import { toColor } from './to_color'; 5 import
Immutable from 'immutable'; 6 import { SharedConstants } from
'../constants/shared_constants'; 7 8 const { DIM } = xrayLayers; 9
10 var colorVariances = id => Immutable.Map({ 11 regular:
toColor(id), 12 transparent: toColor(id, 0.12), 13 faint:
toColor(id, 0.3), 14 selected: toColor(id, 0.9), 15 opaque:
toColor(id, 1) 16 }); 17 18 const xrayBackground = { 19 id:
'xray-background', 20 type: 'background', 21 paint: {
'background-color': 'black' } 22 }; 23 24 /* 25 * Validate that the
model layer type and the xray layer match. xray layers 26 * for
'circle' and 'symbol' model layers are built from multiple xray
layers, so 27 * make exceptions for these types. 28 * 29 * @param
{string} layerType type of xray layer 30 * @param {string}
modelType type of model layer 31 * @return {bool} true if xray
layer and model layer are compatible types. 32 **/ 33 var validType
= (layerType, modelType) => 34 (modelType === layerType)
.parallel. 35 (modelType === 'fill-extrusion' && layerType
'fill') .parallel. 36 (modelType === 'circle' && layerType
'point').parallel. 37 (modelType === 'symbol' && (layerType
==='circle' .parallel. layerType === 'line')); 38 39 /* 40 *
Validate that the model layer and the xray layer have matching
sources, useful 41 * for isolated x-ray views. 42 * 43 * @param
{object} layer xray style layer 44 * @param {immutable} model an
immutable map that of model layer 45 * @return {bool} true if xray
layer and model layer have matching source info. 46 **/ 47 var
validSource = (layer, model) => 48 (layer.source ===
model.get('source')) && 49 (layer['source-layer'] ===
model.get('source-layer')); 50 51 /* 52 * Wrapper function around
model layer source and type validation 53 * 54 * @param {object}
layer xray style layer 55 * @param {immutable} model an immutable
map that of model layer 56 * @return {bool} true if xray layer
correctly represents model layer. 57 **/ 58 var typeAndSourceMatch
= (layer, model) => 59 validType(layer.type, model.get('type'))
&& validSource(layer, model); 60 61 /* 62 * Add the xray
layer filter to the first level of the user-defined filter in the
model layer. 63 * This works because filters have an aggregate
effect and multiple filters can 64 * co-exist side by side in the
first dimension of the filter array. 65 * Regardless of how user
filter is defined, xray layer filter will always apply. 66 * 67 *
@param {array} layerFilter is an array, always a flat geometry
filter 68 * @param {array} modelFilter is an array, can be a
complex nested filter 69 * @return {array} new filter. 70 **/ 71
var mergeFilters = (layerFilter, modelFilter) => 72
modelFilter.concat([layerFilter]); 73 74 /** 75 * Generate an X-Ray
layer based on source and source layer parameters. 76 * 77 * @param
{Object} stylesheet stylesheet 78 * @param {Immutable.Map} model an
immutable map that may be a layer 79 * and defines which
vector_layer we highlight 80 * @param {Immutable.Map} sources used
by stylesheet 81 * @returns {Object} xray-ified stylesheet 82 */ 83
function source( 84 stylesheet: Object, 85 model: Immutable.Map, 86
sources: Immutable.Map): Object { 87 let showAll =
!model.has('source'); 88 let rasterSources = sources 89 .filter(s
=> s.size && s.get('type') === 'raster'); 90 let
vectorLayers = sources 91 .filter(s => s.size &&
s.has('vector_layers')) 92 .map((source, i) =>
source.get('vector_layers').map(vt => vt.set('source', i))) 93
.toList( ).flatten(1) 94 // Remove all layers with duplicate ids
after first one. 95 // These break the VT 2.0 spec_and_Mapbox GL JS
96 .groupBy(vector_layer => vector_layer.get('id')) 97
.map(grouped => grouped.first( ).set('color',
colorVariances(grouped.first( ).get('id')))) 98 .toList( ); 99 100
var overlays = Immutable.List([ ]) 101
.concat(rasterSources.map((source, k) =>
xrayLayers.raster(source, k, DIM))) 102
.concat(rasterSources.map((source, k) =>
xrayLayers.raster(source, k, false, showAll))) 103
.concat(vectorLayers.map(l => xrayLayers.fill(l, DIM))) 104
.concat(vectorLayers.map(l => xrayLayersline(l, DIM))) 105
.concat(vectorLayers.map(l => xrayLayers.lineText(l, DIM))) 106
.concat(vectorLayers.map(l => xrayLayers.point(l, DIM))) 107
.concat(vectorLayers.map(l => xrayLayers.pointText(l, DIM))) 108
.concat(vectorLayers.map(l => xrayLayers.fill(l, false,
showAll))) 109 .concat(vectorLayers.map(l => xrayLayersline(l,
false, showAll))) 110 .concat(vectorLayers.map(l =>
xrayLayerslineText(l, false, showAll))) 111
.concat(vectorLayers.map(l => xrayLayers.point(l, false,
showAll))) 112 .concat(vectorLayers.map(l =>
xrayLayers.pointText(l, false, showAll))) 113 .filter(layer =>
layer.metadata['mapbox:dim'] === DIM .parallel. showAll .parallel.
typeAndSourceMatch(layer, model)) 114 .map(layer => { 115 if
(layer.metadata['mapbox:dim'] === DIM) { 116 return layer; 117 }
118 if (model.has('filter')) { 119 layer.filter =
mergeFilters(layer.filter, model.get('filter').toJS( )); 120 } 121
if (model.has('minzoom') && model.get('minzoom') !==
SharedConstants.MIN_ZOOM) { 122 layer.minzoom =
model.get('minzoom'); 123 } 124 if (model.has('maxzoom') &&
model.get('maxzoom') !== SharedConstants.MAX_ZOOM) { 125
layer.maxzoom = model.get('maxzoom'); 126 } 127 return layer; 128
}); 129 130 stylesheet.layers =
[xrayBackground].concat(overlays.toJS( )); 131 return stylesheet;
132 } 133 134 module.exports = source;
[0053] Below is shown the central logic of getting the style
property value:
TABLE-US-00003 1 /* @flow */ 2 import Immutable from 'immutable'; 3
import * as spec from './spec'; 4 import {
getStylePropertyDefaultValue } from './get_style_property_
default_value'; 5 6 // Returns the property's value in a layer, or
if there is no value 7 // but there is a specified default returns
the property's default value 8 function getStylePropertyValue( 9
propertyId: string, 10 layer: Immutable.Map, 11 options: { 12
skipDefault?: boolean 13 } = { } 14 ): ?any { 15 const property
Spec = spec.getPropertySpec(propertyId); 16 const layerValue =
layer.getIn([propertySpec.propertyType, propertyId]); 17 if
(layerValue !== undefined .parallel. options. skipDefault) return
layerValue; 18 return getStylePropertyDefaultValue(propertyId,
layer); 19 } 20 21 export { getStyleProperty Value };
[0054] A map editing program may be used to design a map to a
user's specifications by allowing a user to select or upload map
data, add custom fonts and images, or define and edit map styles,
among other features. In an embodiment, a map editing program
includes a map style editor creating custom map styles to a user's
specifications. The map style editor may include a graphical user
interface through which a user can define a custom map style or
edit existing map styles.
[0055] Additionally or alternatively, the map style editor may
include a visual map. The visual map may be displayed in
conjunction with one or more map style layer properties. In an
embodiment, the visual map is rendered based on the map style being
edited in the map style editor. As changes are made to style layer
properties, the visual map may be updated to reflect the changes.
For example, if a user specifies a new width property value for
roads, the map style editor may automatically re-display the visual
map and render any roads shown within the map area using the new
width property value.
[0056] According to one embodiment, the techniques described herein
are implemented by one or more special-purpose computing devices.
For example, the server computer 105 and client computing device
145 may be computer devices configured as special-purpose computing
devices. The special-purpose computing devices may be hard-wired to
perform the techniques, or may include digital electronic devices
such as one or more application-specific integrated circuits
(ASICs) or field programmable gate arrays (FPGAs) that are
persistently programmed to perform the techniques, or may include
one or more general purpose hardware processors programmed to
perform the techniques pursuant to program instructions in
firmware, memory, other storage, or a combination. Such
special-purpose computing devices may also combine custom
hard-wired logic, ASICs, or FPGAs with custom programming to
accomplish the techniques. The special-purpose computing devices
may be desktop computer systems, portable computer systems,
handheld devices, networking devices or any other device that
incorporates hard-wired and program logic to implement the
techniques.
[0057] For example, FIG. 1B is a block diagram that illustrates a
computer system 160 upon which an embodiment of the invention may
be implemented. Computer system 160 includes a bus 170 or other
communication mechanism for communicating information, and a
hardware processor 172 coupled with bus 170 for processing
information. Hardware processor 172 may be, for example, a general
purpose microprocessor.
[0058] Computer system 160 also includes a main memory 174, such as
a random access memory (RAM) or other dynamic storage device,
coupled to bus 170 for storing information and instructions to be
executed by processor 172. Main memory 174 also may be used for
storing temporary variables or other intermediate information
during execution of instructions to be executed by processor 172.
Such instructions, when stored in non-transitory storage media
accessible to processor 172, render computer system 160 into a
special-purpose machine that is customized to perform the
operations specified in the instructions.
[0059] Computer system 160 further includes a read only memory
(ROM) 176 or other static storage device coupled to bus 170 for
storing static information and instructions for processor 172. A
storage device 178, such as a magnetic disk, optical disk, or
solid-state drive is provided and coupled to bus 170 for storing
information and instructions.
[0060] Computer system 160 may be coupled via bus 170 to a display
180, such as a cathode ray tube (CRT), LCD screen, LED screen, or
touch screen, for displaying information to a computer user. An
input device 182, which may include alphanumeric and other keys,
buttons, a mouse, a touchscreen, or other input elements, is
coupled to bus 170 for communicating information and command
selections to processor 172. In some embodiments, the computer
system 160 may also include a cursor control 184, such as a mouse,
a trackball, or cursor direction keys for communicating direction
information and command selections to processor 172 and for
controlling cursor movement on display 180. The cursor control 184
typically has two degrees of freedom in two axes, a first axis
(e.g., x) and a second axis (e.g., y), that allows the device to
specify positions in a plane.
[0061] Computer system 160 may implement the techniques described
herein using customized hard-wired logic, one or more ASICs or
FPGAs, firmware and/or program logic which in combination with the
computer system causes or programs computer system 160 to be a
special-purpose machine. According to one embodiment, the
techniques herein are performed by computer system 160 in response
to processor 172 executing one or more sequences of one or more
instructions contained in main memory 174. Such instructions may be
read into main memory 174 from another storage medium, such as
storage device 178. Execution of the sequences of instructions
contained in main memory 174 causes processor 172 to perform the
process steps described herein. In alternative embodiments,
hard-wired circuitry may be used in place of or in combination with
software instructions.
[0062] The term "storage media" as used herein refers to any
non-transitory media that store data and/or instructions that cause
a machine to operate in a specific fashion. Such storage media may
comprise non-volatile media and/or volatile media. Non-volatile
media includes, for example, optical disks, magnetic disks, or
solid-state drives, such as storage device 178. Volatile media
includes dynamic memory, such as main memory 174. Common forms of
storage media include, for example, a floppy disk, a flexible disk,
hard disk, solid-state drive, magnetic tape, or any other magnetic
data storage medium, a CD-ROM, any other optical data storage
medium, any physical medium with patterns of holes, a RAM, a PROM,
and EPROM, a FLASH-EPROM, NVRAM, any other memory chip or
cartridge.
[0063] Storage media is distinct from but may be used in
conjunction with transmission media. Transmission media
participates in transferring information between storage media. For
example, transmission media includes coaxial cables, copper wire
and fiber optics, including the wires that comprise bus 170.
Transmission media can also take the form of acoustic, radio, or
light waves, such as those generated during radio-wave and
infra-red data communications, such as WI-FI, 3G, 4G, BLUETOOTH, or
wireless communications following any other wireless networking
standard.
[0064] Various forms of media may be involved in carrying one or
more sequences of one or more instructions to processor 172 for
execution. For example, the instructions may initially be carried
on a magnetic disk or solid-state drive of a remote computer. The
remote computer can load the instructions into its dynamic memory
and send the instructions over a telephone line using a modem. A
modem local to computer system 160 can receive the data on the
telephone line and use an infra-red transmitter to convert the data
to an infra-red signal. An infra-red detector can receive the data
carried in the infra-red signal and appropriate circuitry can place
the data on bus 170. Bus 170 carries the data to main memory 174,
from which processor 172 retrieves and executes the instructions.
The instructions received by main memory 174 may optionally be
stored on storage device 178 either before or after execution by
processor 172.
[0065] Computer system 160 also includes a communication interface
186 coupled to bus 170. Communication interface 186 provides a
two-way data communication coupling to a network link 188 that is
connected to a local network 190. For example, communication
interface 186 may be an integrated services digital network (ISDN)
card, cable modem, satellite modem, or a modem to provide a data
communication connection to a corresponding type of telephone line.
As another example, communication interface 186 may be a local area
network (LAN) card to provide a data communication connection to a
compatible LAN. Wireless links may also be implemented. In any such
implementation, communication interface 186 sends and receives
electrical, electromagnetic or optical signals that carry digital
data streams representing various types of information.
[0066] Network link 188 typically provides data communication
through one or more networks to other data devices. For example,
network link 188 may provide a connection through local network 190
to a host computer 192 or to data equipment operated by an Internet
Service Provider (ISP) 194. ISP 194 in turn provides data
communication services through the world wide packet data
communication network now commonly referred to as the "Internet"
196. Local network 190 and Internet 196 both use electrical,
electromagnetic or optical signals that carry digital data streams.
The signals through the various networks and the signals on network
link 188 and through communication interface 186, which carry the
digital data to and from computer system 160, are example forms of
transmission media.
[0067] Computer system 160 can send messages and receive data,
including program code, through the network(s), network link 188
and communication interface 186. In the Internet example, a server
198 might transmit a requested code for an application program
through Internet 196, ISP 194, local network 190 and communication
interface 186.
[0068] The received code may be executed by processor 172 as it is
received, and/or stored in storage device 178, or other
non-volatile storage for later execution.
User Interfaces and Process Flow
[0069] FIG. 2 illustrates an example graphical user interface of a
map style editor. The map style editor includes style layer list
210, style layer property list 220, and visual map 230.
[0070] In an embodiment, style layer list 210 displays a list of
style layers and style layer groups for the selected map style.
Additionally or alternatively, the style layer list 210 indicates
the number of layers within each layer group next to the name of
the layer group. In the illustrated example, map style layer list
210 lists a plurality of style layers and style layer groups for a
map style titled "Bright."
[0071] Additionally or alternatively, a user can create, sort,
group, and delete layers using the map style editor. In the
illustrated example, style layer list 210 includes a toolbar
comprising a new layer button, a duplicate layer button 202, a
group/ungroup layers button 204, a show/hide layers button 206, and
a delete layer button 208. The new layer button causes the map
style editor to display a dialog for specifying map data styled by
the map style layer, such as a source map tile set, style layer
filters, and other information for creating a new map style layer.
The duplicate layer button 202 allows a user to copy a style layer
or a group of style layers. The group/ungroup layers button 204
groups multiple selected layers or ungroups a group of style
layers. The show/hide layers button 206 shows or hides one or more
selected style layers on the map. The delete layer button 208
deletes one or more selected style layers from the map style.
[0072] In an embodiment, selecting one or more style layers in the
style layer list 210 allows a user to view and edit the properties
for the selected layer(s). In the illustrated example, the
"road_street" style layer is selected in style layer list 210.
Style layer property list 220 displays style layer properties that
are associated with a selected style layer. Additionally or
alternatively, style layer property list 220 displays the property
value assigned to each style layer property. In the present
example, style layer property list 220 includes a plurality of
style layer properties for the "road_street" style layer, such as
the ones indicated by the label style layer properties 222.
[0073] In an embodiment, style layer property list 220 includes a
property editor for one or more style layer properties, such as the
style layer property editors 224 indicated for style layer
properties 222. In the example illustrated in FIG. 2, the Color,
Pattern, and Opacity style layer properties each have a
corresponding text field. The text fields indicate the current
value of each style layer property. Selecting a property editor may
bring up a graphical editor where the user can select a value for
the property, such as a color selection panel for the Color
property. A user may also edit the property value by typing or
pasting text into the text field. Other properties may have buttons
or other types of user interface components that allow a user to
select or specify a property value.
[0074] In an embodiment, selecting a property editor may cause the
map style editor to display a graphical editor where the user can
select an existing property value. An existing property value may
include other values assigned to the same style property in other
style layers. For example, if a line color property is selected,
the map style editor may display a list of line colors used in
other style layers. Existing values may also include values for
other properties that have a similar value type. For example,
selecting a style property with a color property value may cause
the map style editor to display a list of all colors used in other
style layers of the map, such as other line colors, fill colors,
text color, and etc. Selecting an existing style property value
sets the value of the selected style property.
[0075] In an embodiment, if a layer group is selected, editing a
style layer property sets the property value for every style layer
within the style layer group. If style layers within a style layer
group have different values for the same style layer property, the
map style editor may display a list of the different property
values and let the user select a property value to apply to the
style layer property for all style layers in the style layer group.
In an embodiment, only style layers of the same style layer
type--symbols, circles, fills, lines, backgrounds, or polygons--can
be edited together. If a selection includes more than one style
layer type, the map style editor may offer a selection of style
layer types for a user to select and narrow down to a single
type.
[0076] Visual map 230 is a visual representation of a particular
area of a digital map. In an embodiment, one or more map tiles
corresponding to the particular area of the digital map are
requested and processed in order to render the visual map. Visual
map 230 may be updated or re-redisplayed as a user pans or zooms
the map. Additionally or alternatively, visual map 230 may be
rendered based on the selected map style that is being edited in
the map style editor. When changes are made to the map style, the
map style editor may update or re-display visual map 230. In other
words, visual map 230 may provide a real-time representation of how
digital maps will look if rendered using the selected map
style.
Visual Selection of Style Layer Data
[0077] In an embodiment, the map style editor may indicate, in a
visual map, data that is being styled by a map style layer. The map
style editor may display a visual selection of one or more map
features that are visible in the visual map and that are defined by
the map data source for the map style layer. Using the visual
selection, a user can determine what map data within a visual map
will be styled by a particular map style layer. For example, if a
map style layer specifies visual style rules for a "Water" data
layer, then the visual selection indicates map features from the
"Water" data layer, such as rivers, lakes, oceans, canals, and etc,
that are displayed in the digital map.
[0078] The map style editor may display the visual selection of map
features while the user is editing an existing map style layer.
Referring now to FIG. 8, it is a flowchart showing a process 800
for visually distinguishing selection of map style layer data,
according to one embodiment. In various embodiments, the operations
of the process 800 of FIG. 8 may be implemented in programming by a
server computer 105 or its components as described herein. For
example, the operations of process 800 may be performed by the
mapping application 110 according to map editing instructions 115
as described with reference to FIGS. 1-7B. In some examples, the
server computer 105 may execute a set of instructions or sequence
of instructions (e.g., the map editing instructions 115) to control
the functional elements of server computer 105 to perform the
functions described below. Additionally or alternatively, server
computer 105 may perform aspects of the functions described below
using special-purpose hardware. In some embodiments, the map
editing instructions 115 may instruct the server computer to
interact with the database 120 to perform the functions described
below using database interface 117. In some embodiments, one or
more functions described below may be performed by the mobile
computing device 145.
[0079] Initially, the server computer 105 executing the mapping
application 110 displays 805 source map data layer information from
a style sheet for a digital map and displays 810 visual map layers
corresponding to the source map data layer information.
[0080] The server computer 105 executing the mapping application
110 then receives 815 a request to select a particular source map
data layer (e.g., via user input into a user interface).
[0081] In an embodiment, the map style editor receives a request to
select map data corresponding to a map style layer. For example,
referring again to FIG. 2, map style layer property list 220 may
include a "select data" button 240 in addition to the list of style
layer properties 222. Selecting the "select data" button 240 sends
a request to select data for the selected style layer. In response
to receiving the request to select map data, the map style editor
displays a visual selection on visual map 230 of map features
displayed in visual map 230 that are associated with the selected
map style layer.
[0082] Referring again to FIG. 8, the server computer 105 executing
the mapping application 110 visually distinguishes 820, in the
display of the visual map layers, any features of the visual map
layers defined by the selected particular source map data layer. As
a part of this step 820, the server computer 105 executing the
mapping application 110 determines 825 the source map data layer
information specified by the selected source map style layer, and
determines 830 whether the selected particular source map data
layer has corresponding features in the visual map layers for
display. If it does, the features are visually distinguished in the
display of the visual map layers that are rendered 835 in response
to the selected particular source map data layer having
corresponding features in the visual map layers. If not, no visual
map layers features are visually distinguished 840.
[0083] Additionally or alternatively, the map style editor may
display one or more style layer data properties associated with the
selected style layer. The style layer data properties specify map
data source information for the selected map style layer. For
example, style layer data properties may include map data source,
style layer type, minimum and maximum zoom levels, and style layer
filters. Additionally or alternatively, the map style editor
displays a property editor for each style layer data property. For
example, selecting a map data source property may cause the map
style editor to display a dialog for specifying a source map data
layer for the selected map style layer.
[0084] The server computer 105 executing the mapping application
110 also may receive 850 input specifying one or more updates to
the source map data layer information for the selected particular
source map data layer, and as a result re-render the display of the
visual map layers (e.g., return to step 825), such that an updated
set of features defined by the updated source map data layer
information for the selected particular source map data layer are
then visually distinguished in the re-rendered display. Updates
received can include, e.g., applying or removing style layer
filters, updating a source map data layer or tileset, updating a
style layer type, creating a new style layer, and adjusting a zoom
level for the vial map display.
[0085] In an embodiment, displaying the visual selection may
comprise determining a source map data layer specified by the map
style layer. A visual map is displayed by rendering one or more map
tiles corresponding to a particular area of a digital map. The map
style editor determines if any map features are defined in the
source map data layer within the one or more map tiles and displays
a visual selection that selects the map features. The visual
selection selects any map features that are defined in the source
map data layer within the one or more map tiles. If no map features
are in the particular map area, then the visual selection may be
empty. In other words, a visual selection may not be displayed if
no map features defined in the source map data layer are visible in
the digital map. Additionally or alternatively, panning or zooming
in and out of the visual map may cause the visual selection to be
re-displayed. The map style editor may request one or more updated
map tiles corresponding to an updated map area. The map style
editor may determine if any map features are defined in the source
map data layer within the one or more updated map tiles and display
an updated visual selection selecting the map features.
[0086] FIG. 3 illustrates an example visual selection corresponding
to a map style layer. In FIG. 3, map style layer data property list
320 is displaying style layer data properties associated with a
"road_street" map style layer. The map data source is a "road" data
layer. For the purpose of illustrating a clear example, assume the
"road" data layer defines roads within a digital map, such as
streets, paths, and bridges.
[0087] In addition to editing the source data, user input can be
received to adjust how much of the source data is included. Panel
320 has four main components: Source (vector data source), type
selector (fill, line, circle), zoom cut-offs, `filters` (geometry,
properties-based filters). The type selector allows the user to
alter not only the amount or type of data displayed but also the
way that data is rendered. For example, roads data is typically in
the form of lines. While the roads data can be rendered as lines
(and would visually appear the way you expect), it can also be
edited in this panel 320 to be rendered as polygons or circles
(points) instead. Including this selection here allows accurate
visual representations of how data will be rendered on a live
map.
[0088] FIG. 3 also shows visual map 230, which includes a visual
distinction/selection 330 that shows a plurality of roads that are
displayed in visual map 230.
[0089] The map style editor may also display the visual selection
of map features while the user is creating a new map style layer.
In an embodiment, the map style editor receives a request to create
a new map style layer. For example, a user may select the new layer
button in style layer list 210. The map style editor displays a
dialog for specifying map data to be styled by the map style
layer.
[0090] FIG. 4 illustrates an example new style layer editor 420.
New style layer 420 displays one or more style layer data property
editors, such as map data source editor 422. Selecting map data
source editor 422 may display source data layer selection editor
440. Source data layer selection editor 440 displays a plurality of
map data layers. In an embodiment, source data layer selection
editor 440 displays each map data layer stored in electronic map
data 130. A user may select a data layer using data layer selection
editor 440.
[0091] In response to receiving a selection of a particular source
map data layer, the map style editor displays a visual selection of
map features displayed in the digital map that are defined by the
selected map data layer. In FIG. 4, the "landuse" data layer is
selected. Visual map 230 includes a visual selection 430 that
selects a plurality of landuse map features, such as parks, that
are displayed in visual map 230.
[0092] In an embodiment, displaying the visual selection may
comprise, for example, highlighting the map features, outlining the
map features, or displaying the map features in a particular color.
Additionally or alternatively, the map style editor may
de-emphasize map features that are not selected by the visual
selection. De-emphasizing map features may comprise, for example,
displaying the map features in grayscale, displaying the map
features in a lighter color, or displaying the map features at a
lower opacity. In the example illustrated by FIG. 3, roads are
highlighted while other map features are displayed in gray.
[0093] In an embodiment, the visual selection is displayed in a
particular color, of a plurality of different available colors,
based on the map data source for the map style layer. The map data
source may be a source map data layer selected from a plurality of
map data layers. The map style editor may associate or assign a
different color to each map data layer. The visual selection is
displayed in the color that is associated with or assigned to the
source map data layer.
[0094] For example, each map data layer of electronic map data 130
may be associated with a respective color. Assume a "Water" data
layer is associated with the color blue, a "Road" data layer is
associated with the color yellow, and a "Building" data layer is
associated with the color green. If the source map data layer is
"Water" then the visual selection is displayed in blue. Referring
to FIG. 3, the source map data layer is "road," so visual selection
330 would be displayed in yellow.
[0095] In an embodiment, changing the source map data layer for a
map style layer causes the map style editor to re-display the
visual selection. For example, changing the source map data layer
from "Water" to "Roads" causes the selection of map features from
the "Water" data layer to be removed and a selection of map
features from the "Roads" data layer to be displayed. Additionally
or alternatively, the color of the visual selection may be updated
based on the updated source map data layer. For example, changing
the source data layer from "Water" to "Roads" causes the visual
selection to be re-displayed in yellow instead of blue.
[0096] In an embodiment, the visual selection is displayed using a
shape, of a plurality of different available shapes, based on the
style layer type of the map style layer. For example, the visual
selection for a map style layer that is a line layer type may be
displayed using lines. The visual selection for a map style layer
that is a polygon layer type may be displayed using polygons, and
the visual selection for a circle layer type may be displayed using
dots.
[0097] In the example illustrated in FIG. 3, the selected map style
layer is a line style layer type. Based on the line style layer
type, visual selection 330 is displayed using lines. As another
example, FIG. 5 illustrates an example visual selection for a
polygon style layer type. In FIG. 5, a "building" style layer is
selected. The source map data layer is "building" and the style
layer type is "fill." Visual selection 530 selects buildings that
are displayed in visual map 230. Visual selection 530 is displayed
using filled-in polygons.
[0098] In an embodiment, changing the style layer type for a map
style layer causes the map style editor to re-display the visual
selection based on the updated style layer type. FIG. 6 illustrates
visual selection 530 after the style layer type is changed. In FIG.
6, the style layer type for the "building" map style layer is
changed from "fill," as illustrated in FIG. 5, to "line." The map
style editor re-displays visual selection 530 in response to
receiving the updated style layer type. As illustrated in FIG. 6,
visual selection 530 is re-displayed using lines instead of
polygons.
[0099] In an embodiment, a map style layer may specify one or more
style layer filters. The map features selected by the visual
selection may be based on the one or more style layer filters. The
one or more style layer filters are applied to map features defined
by the source map data layer. Map features that satisfy the one or
more style layer filters are selected in the visual selection.
[0100] For example, assume map features defined in a "road" data
layer have classifications such as "street," "bridge," "path," and
etc. If the map style layer specifies a style layer filter that
selects map features from the "road" data layer whose
classification is "street," then the visual selection selects all
streets that are displayed in the digital map. Roads whose
classification are not "street," such as "bridge" or "path" are not
selected by the visual selection.
[0101] In an embodiment, adding one or more style layer filters for
a map style layer causes the map style editor to re-display the
visual selection based on the one or more added style layer
filters. Additionally or alternatively, modifying one or more
existing style layers filters for a map style layer causes the map
style editor to re-display the visual selection based on the
modified style layer filters. Additionally or alternatively,
removing one or more style layer filters for a map style layer
causes the map style editor to re-display the visual selection
based on the one or more deleted style layer filters. Re-displaying
the visual selection may comprise determining map features that
satisfy the updated set of zero or more style layer filters. The
visual selection selects the map features that satisfy the updated
set of style layer filters.
[0102] FIG. 7A illustrates an example visual selection for a map
style layer. Visual map 730 includes a visual selection 740. The
source map data layer is a "road" data layer and no style layer
filters are specified by the map style layer. Visual selection 740
selects a plurality of roads that are displayed in visual map
730.
[0103] For the purpose of illustrating a clear example, assume the
map style editor receives input specifying a style layer filter
that selects roads whose classification is either "primary,"
"secondary," or "tertiary." FIG. 7B illustrates the visual
selection after receiving the style layer filter. Visual map 730 is
updated based on the new style layer filter. Updated visual
selection 740 selects primary, secondary, and tertiary roads
displayed in visual map 730. The portion of visual selection 740
corresponding to roads that do not satisfy the new style layer
filter are removed in the updated visual selection.
* * * * *