Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A svg-based google user map text labeling method

A text and map technology used in the computer field

Inactive Publication Date: 2017-04-19
杨立法
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] However, the HTML5Canvas element has great limitations in text drawing, and can only be drawn from left to right in the horizontal direction

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A svg-based google user map text labeling method
  • A svg-based google user map text labeling method
  • A svg-based google user map text labeling method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The technical solution of the present invention will be described in further detail below in conjunction with the accompanying drawings and specific examples.

[0025] 1 SVG-based map labeling class SVGMapLabel

[0026] 1.1 SVG Text

[0027] SVG is the abbreviation of Scalable Vector Graphics (scalable vector graphics), which is an XML-style graphic markup language included in HTML5. Unlike the way HTML5Canvas uses APIs for drawing, HTML5SVG uses a series of proprietary tags to describe Web page graphics. In terms of text drawing, it uses the text element and its many style attributes to control text drawing, such as figure 1 Documentation snippet shown above. The purpose of this document is to draw text along the path, which will be rendered by the browser (need to support HTML5) figure 1 Lower output.

[0028] When the browser renders svg, it outputs the svg element as a tile on the page, and its attribute (x, y) refers to the position (in pixels) of its upper le...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Google user map text labeling method based on an SVG. The method includes the steps that an SVG object with a path text is added to a self-defining overlaying layer of a Google map, and when the overlaying layer is drawn, a current map projection is acquired through a getProjection method; a labeled path represented by longitudes and latitudes is converted into a pixel path under the current projection; the length of the pixel path is calculated and compared with the length of a labeled text, if the pixel path is too short, the SVG object is not displayed; the starting point position of the labeled text on the pixel path is determined so that it can be guaranteed that the text is located in the middle of the path; the space, actually occupied by the labeled text, of the pixel path is determined according to the length of the text; the minimum coordinate value of the labeled text on the pixel path is determined through comparison and serves as a top left corner coordinate of the SVG object; the pixel path of the labeled text relative to the SVG top left corner is calculated; the text pixel path expressed by coordinate strings is converted into a path of path elements in the SVG, and d attributes of the path are replaced. The text labeling problem is solved, and a new way is found for Google user map text labeling.

Description

technical field [0001] The invention belongs to the technical field of computers, and relates to an SVG-based Google user map text labeling method. Background technique [0002] Maps are difficult to understand without text, and each map element requires a text annotation. Traditional GIS (Geographic Information System, Geographic Information System) software, such as ArcGIS, Maplnfo, etc., has rich automatic text labeling functions, and there is no need to consider labeling issues when establishing application systems for secondary development. However, with the widespread use of Google Maps in recent years, more and more users hope to build applications on Google Maps. Google MapsAPI V3 is a basic tool for building Google Maps application system, which provides many map drawing functions, but lacks corresponding text labeling functions. [0003] For labeling problems, Google provides several solutions, that is, using Marker symbols (default or custom symbols), pop-up Inf...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/30
CPCG06F16/29
Inventor 杨立法
Owner 杨立法
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products