Because we do have a project on tourism, so it involves the map function. One of the tasks I received was to show a few designated sights on the map and add markers to the map.
Our project is using Sogou map. The JS version number is used. If you are interested, you can refer to the Search Map API and Demo sample code.
Adding markers to a map is a basic function of the map. This mark is called marker. Can be crossing from here on the Internet for marker class introduction.
The basic steps to implement, first create a map on the page. Then add a marker to the map. You can specify the location, the display content, the marker on the map, and so on.
See the code for details:
:
isn't it very easy? In fact, with these, it's just one of the simplest styles. In the next blog post, we add luster to him. Please look forward to it.
GIS (i)--add marker tag to JS search map