简体   繁体   中英

xml parsing for showing marker on google map

我想展示不同势颜色的标记在谷歌地图根据“ type ”中xml..means我想diffrentiate标记acccording为“ type ”的XML所以先生怎么办解析为显示在谷歌地图不同势颜色的标记,当我单击任何一个标记时,它显示一个气球,其中的“画廊名称”将被写上..... url为http://site4demo.com/artealdiaonline/output.php?lat=-34.6394879&lng=-58.3617837kk

Your XML File is not that small. I recommend you to use SAX Parser for your purpose. You don't need all these information in your in-memory objects i guess because you just want to make markers on your map. With DOM, the whole XML tree will be kept in memory. I'm trying to avoid this on phones all the time due to the limited memory resources.

So you can use a SAX Parser (here is an easy example: SAX ) and then react on your row elements by creating a new Marker in your map.

Use an XML Parser:

  1. SAX
  2. DOM
  3. StAX

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM