Shanghai map update: Share Shanghai Revision

Source: Internet
Author: User

Since the previous release of the map of Shanghai and Beijing in a low profile, I have been thinking about how to do better. This time, I published the map of Shanghai to my sharing site in Shanghai, there are a lot of updated content, and most of the Code is basically rewritten.CodeI wrote it intermittently, and I didn't know the code, so I was very tired. I planned to do it well for seven days on the National Day, but I was never at ease writing such a thing in the middle, until recently, I felt that I was really unwilling to go online, so I decided to launch it in March. In summary, I thought that the inertia of people was terrible. OK. Let's talk about it. See the figure below:

It is similar to the previous map interface, but you may not have noticed many changes. The general changes include:

1. integrate data search and Topic map. You can search for a map and access the Topic map without navigation.

2. In addition to standard data (only simple name, address, phone, and other content), data search adds value-added data (that is, detailed content Introduction and image content ), value-added data is a special part and will be continuously added in the future.

3. Each value-added data has an independent page on which you can leave a message.

4. Changed the obscure "show POI in the current range" to "search in the field of vision", following Baidu's field of vision search function, however, I did not add another query. I only query the list of interest points in the current range.

5. added a small application of weather forecast, but only for the weather in Shanghai.

There are so many possible changes, so what interesting technologies are used? PHP + Ajax, but PHP is the function of reading and querying databases and displaying them as XML. The rest is not very useful. Basically, all the functions are written in JavaScript with jquery. Let's take a simple look:

1. jquery: I don't need to mention this well-known JS framework. I used it to complete most of the content, especially the processing of XML files. Jquery is indeed simple and easy to use, saving us a lot of things, which is much easier than prototype.

2. jquery. pagefoot is a jquery-based paging plug-in used for paging processing with too many results. Although there is a plug-in like jpage for jquery, I finally gave up, the implementation principle is not the same, the pagefoot plug-in is only paging, do not extract data, and jpage needs to use all the data, I may be confused about this, but I think pagefoot is simple and practical.

3. Google weather API. The weather API of Google was used to learn how to use weather forecasts for Baidu. This was originally intended to use jquery for cross-origin access, but failed, finally, I had to write a PHP file to read the Google weather API and then output it directly to the page.

4. snews is used to present value-added data. This is a CMS system, but it is the world's smallest CMS system, because it can be said that there is only one PHP file, but it contains a vast majority of CMS Content, A Simple CMS, for example, used to build a company webpage, it is absolutely sufficient to use it, except for having no tag function. However, due to the limitations of snews, the changes to the main content are not flexible enough. Now it seems that I did not use WordPress as a CMS display, which is a mistake, it seems that you still need to study the data structure of WordPress.

This is probably the content, but it is also an exciting release, the problem is inevitable, some features are not even written (because it is not used yet ), in the next step, we should add support for GPX and kml files. If you are the best, you can integrate WordPress. I don't know any suggestions. Please feel free to give me feedback. The access address is attached, welcome to share Shanghai: http://sharesh.cn/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.