WindowsPhone 简易地图的制作(求助啊!!!!)

wangchenran 2014-08-05 09:37:36
加精
最近在做一个景点的WindowsPhone App,

里面有个需求是对一张高清图片实现地图的功能,

实际上就是对这张图片进行放大缩小和平移,我用 ManipulationCompleted ManipulationDelta ManipulationStarted 实现了对图片的放大缩小 和平移

但是还要求能在图片上添加标记(就是添加一些控件例如:Ellipse 这些控件能被点击)

我想问 添加标记后 这些标记在图片放大 缩小 平移 后怎么重新找到各自的位置?

在线等解答!十分感谢!

附上XAML代码:

<Grid Grid.Row="1" Margin="24" Background="Transparent">


<ViewportControl x:Name="Viewport" HorizontalAlignment="Left" VerticalAlignment="Top">

<Canvas Width="400" Height="600">
<Image x:Name="Image" Stretch="Uniform"
CacheMode="BitmapCache"
ManipulationStarted="Viewport_ManipulationStarted"
ManipulationDelta="Viewport_ManipulationDelta"
ManipulationCompleted="Viewport_ManipulationCompleted"
/>
<Ellipse x:Name="el_Mark" Canvas.Left="30" Canvas.Top="200" Width="30" Height="30" Fill="#FFF90000" />
</Canvas>

</ViewportControl>
</Grid>
...全文
947 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangchenran 2014-08-20
  • 打赏
  • 举报
回复
引用 20 楼 micropentium6 的回复:
[quote=引用 19 楼 vbfool 的回复:] [quote=引用 18 楼 micropentium6 的回复:] [quote=引用 17 楼 vbfool 的回复:] 嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
I am not sure the meaning of "派生" here. If you can't get “地图数据” from a trusted source, the app is NOT a mapping application. GIS is a serious industry. Did you watch TV news recently? The disaster relief effort made by national remote sensing and survey agency? The aerial photography taken by drone and then overlap with national DEM data? That is GIS. it helps the stakeholders to evaluate the situation of quake lake...not to mention the paper map hanging in the "situation room" while the prime minister Li met his satff. That's GIS as well. so, where you can "派生" GIS data by yourself?[/quote] 本来需求就不是要一个“真正的地图应用”,而是单纯的“景区展示”,数据源就是一张景区的图片,而其中的实际地理信息并不是必要的,写一个假的经纬度范围就可以了。 说了这么久,楼主都不见了。[/quote] I gave my opinion as a GIS professional. We have different perspectives. Fake lat/Lon works for display only. Any extension/change that depends on LBS, such us "show my current location on 景区, will break ur assumption. And we all know there is always changes. For me, the difference is like iphone vs 小米. I don't want to keep arguing with u on this topic. I understand u had first hand experience. But that doesn't necessarily mean other opinions are not as valuable as yours. [/quote] 在安卓上有个开源库叫做:mAppwidget 可以对一张手绘地图图片 做放大平移操作 还可以增加标记点(小景点) 那么在WP上应该用什么?
wangchenran 2014-08-20
  • 打赏
  • 举报
回复
引用 20 楼 micropentium6 的回复:
[quote=引用 19 楼 vbfool 的回复:] [quote=引用 18 楼 micropentium6 的回复:] [quote=引用 17 楼 vbfool 的回复:] 嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
I am not sure the meaning of "派生" here. If you can't get “地图数据” from a trusted source, the app is NOT a mapping application. GIS is a serious industry. Did you watch TV news recently? The disaster relief effort made by national remote sensing and survey agency? The aerial photography taken by drone and then overlap with national DEM data? That is GIS. it helps the stakeholders to evaluate the situation of quake lake...not to mention the paper map hanging in the "situation room" while the prime minister Li met his satff. That's GIS as well. so, where you can "派生" GIS data by yourself?[/quote] 本来需求就不是要一个“真正的地图应用”,而是单纯的“景区展示”,数据源就是一张景区的图片,而其中的实际地理信息并不是必要的,写一个假的经纬度范围就可以了。 说了这么久,楼主都不见了。[/quote] I gave my opinion as a GIS professional. We have different perspectives. Fake lat/Lon works for display only. Any extension/change that depends on LBS, such us "show my current location on 景区, will break ur assumption. And we all know there is always changes. For me, the difference is like iphone vs 小米. I don't want to keep arguing with u on this topic. I understand u had first hand experience. But that doesn't necessarily mean other opinions are not as valuable as yours. [/quote] 我想知道现在有没有讨论出什么好的法子来 - -! 现在还没实现该功能! 十分感激你们对该问题的关注!
qq_15147127 2014-08-10
  • 打赏
  • 举报
回复
太高深了 看不懂 谢分享
  • 打赏
  • 举报
回复
引用 19 楼 vbfool 的回复:
[quote=引用 18 楼 micropentium6 的回复:] [quote=引用 17 楼 vbfool 的回复:] 嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
I am not sure the meaning of "派生" here. If you can't get “地图数据” from a trusted source, the app is NOT a mapping application. GIS is a serious industry. Did you watch TV news recently? The disaster relief effort made by national remote sensing and survey agency? The aerial photography taken by drone and then overlap with national DEM data? That is GIS. it helps the stakeholders to evaluate the situation of quake lake...not to mention the paper map hanging in the "situation room" while the prime minister Li met his satff. That's GIS as well. so, where you can "派生" GIS data by yourself?[/quote] 本来需求就不是要一个“真正的地图应用”,而是单纯的“景区展示”,数据源就是一张景区的图片,而其中的实际地理信息并不是必要的,写一个假的经纬度范围就可以了。 说了这么久,楼主都不见了。[/quote] I gave my opinion as a GIS professional. We have different perspectives. Fake lat/Lon works for display only. Any extension/change that depends on LBS, such us "show my current location on 景区, will break ur assumption. And we all know there is always changes. For me, the difference is like iphone vs 小米. I don't want to keep arguing with u on this topic. I understand u had first hand experience. But that doesn't necessarily mean other opinions are not as valuable as yours.
vbfool 2014-08-08
  • 打赏
  • 举报
回复
引用 18 楼 micropentium6 的回复:
[quote=引用 17 楼 vbfool 的回复:] 嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
I am not sure the meaning of "派生" here. If you can't get “地图数据” from a trusted source, the app is NOT a mapping application. GIS is a serious industry. Did you watch TV news recently? The disaster relief effort made by national remote sensing and survey agency? The aerial photography taken by drone and then overlap with national DEM data? That is GIS. it helps the stakeholders to evaluate the situation of quake lake...not to mention the paper map hanging in the "situation room" while the prime minister Li met his satff. That's GIS as well. so, where you can "派生" GIS data by yourself?[/quote] 本来需求就不是要一个“真正的地图应用”,而是单纯的“景区展示”,数据源就是一张景区的图片,而其中的实际地理信息并不是必要的,写一个假的经纬度范围就可以了。 说了这么久,楼主都不见了。
  • 打赏
  • 举报
回复
引用 17 楼 vbfool 的回复:
嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
I am not sure the meaning of "派生" here. If you can't get “地图数据” from a trusted source, the app is NOT a mapping application. GIS is a serious industry. Did you watch TV news recently? The disaster relief effort made by national remote sensing and survey agency? The aerial photography taken by drone and then overlap with national DEM data? That is GIS. it helps the stakeholders to evaluate the situation of quake lake...not to mention the paper map hanging in the "situation room" while the prime minister Li met his satff. That's GIS as well. so, where you can "派生" GIS data by yourself?
vbfool 2014-08-07
  • 打赏
  • 举报
回复
引用 16 楼 micropentium6 的回复:
[quote=引用 13 楼 vbfool 的回复:] 好吧,你觉得不靠谱,那理论上WP自带的MapControl一样可以做到我刚才说的那些,当然要自己虚拟一个地图数据源了,而且应该是没有无极缩放能力了。
OK, I have to apologize that my comments probably distracted people. We were stuck on whether ArcGIS mobile and other necessary components are free, which is not the topic of this thread... I feel It's my responsibility to bring up some concrete ideas with explanations. First, I have to admit that I am lack of the experience with Windows phone development. My most recent development experience on Windows mobile devices was back to 2007 on pocket PC and smart phone running Windows CE.The development environment is VC++ and .Net. However, I did implement all the functionalities that were described in this thread using VC++, which can prove the point I'd like to make next. There is really no need to use any extra GIS components coz they are too heavy for this app. panning/zooming on "控件" (that's how you call it, GISers call them vectors) can be implemented by your own without too much headache. If you are familiar with C#, you may want to take a look on SharpMap, which is completely open source. You would be surprised to see how simple the implementation of panning and zooming is. Another issue is the data you want to serve with or without ArcGIS: Where do you plan to keep your data? Is there any copyright concerns, do you feel comfortable to allow downloading all map data to the mobile? This decision could have a big impact on the implementation of your app. If you don't want to "share" data, you will have to have a server component as the data source. The standard communication protocols between GIS server and clients could be a huge overhead for you, not to mention the installation/configuration. From what you described, I lean to the idea that map data should be packaged with the app. It is just a picture (we call it raster), isn't it? Just my 2 cents, [/quote] 嗯,应该和你说的差不多,地图数据源是可以自己派生的,不一定非要是“地图数据”。
  • 打赏
  • 举报
回复
引用 13 楼 vbfool 的回复:
好吧,你觉得不靠谱,那理论上WP自带的MapControl一样可以做到我刚才说的那些,当然要自己虚拟一个地图数据源了,而且应该是没有无极缩放能力了。
OK, I have to apologize that my comments probably distracted people. We were stuck on whether ArcGIS mobile and other necessary components are free, which is not the topic of this thread... I feel It's my responsibility to bring up some concrete ideas with explanations. First, I have to admit that I am lack of the experience with Windows phone development. My most recent development experience on Windows mobile devices was back to 2007 on pocket PC and smart phone running Windows CE.The development environment is VC++ and .Net. However, I did implement all the functionalities that were described in this thread using VC++, which can prove the point I'd like to make next. There is really no need to use any extra GIS components coz they are too heavy for this app. panning/zooming on "控件" (that's how you call it, GISers call them vectors) can be implemented by your own without too much headache. If you are familiar with C#, you may want to take a look on SharpMap, which is completely open source. You would be surprised to see how simple the implementation of panning and zooming is. Another issue is the data you want to serve with or without ArcGIS: Where do you plan to keep your data? Is there any copyright concerns, do you feel comfortable to allow downloading all map data to the mobile? This decision could have a big impact on the implementation of your app. If you don't want to "share" data, you will have to have a server component as the data source. The standard communication protocols between GIS server and clients could be a huge overhead for you, not to mention the installation/configuration. From what you described, I lean to the idea that map data should be packaged with the app. It is just a picture (we call it raster), isn't it? Just my 2 cents,
  • 打赏
  • 举报
回复
引用 1 楼 vbfool 的回复:
如果是我,我就直接用ArcGIS的组件了。这玩意儿直接做确实烦。
Do u have idea how much arcgis could cost u? Besides, it is not "这玩意”. It is called GIS. Show some respect, ok? Leaflet is a good option. It is designed for mobile devices and it is free. But, it is JavaScript. If u really have to use windows control or require your app functional without cell signal, then I am sure u could find plenty of open source packages out there...
白瓷。斯沃 2014-08-06
  • 打赏
  • 举报
回复
我也想知道,哪位大神会做,求指导啊
vbfool 2014-08-06
  • 打赏
  • 举报
回复
引用 7 楼 wangchenran 的回复:
[quote=引用 6 楼 vbfool 的回复:] https://www.nuget.org/packages/Esri.ArcGISRuntime.Toolkit/10.2.3.591-beta 嗯,应该是这个,这个是Runtime版的,WP8的还是原来那个
您应该做过ArcGIS for windowsphone 的开发吧 ? 有写过相关的博文吗?E文看起来不是很顺 - -[/quote] 我以前看的是一个大神的博客,但是我现在找不到了。
line_us 2014-08-06
  • 打赏
  • 举报
回复
这种玩法很有趣。
vbfool 2014-08-06
  • 打赏
  • 举报
回复
引用 12 楼 micropentium6 的回复:
[quote=引用 11 楼 vbfool 的回复:] [quote=引用 9 楼 micropentium6 的回复:] [quote=引用 1 楼 vbfool 的回复:] 如果是我,我就直接用ArcGIS的组件了。这玩意儿直接做确实烦。
Do u have idea how much arcgis could cost u? Besides, it is not "这玩意”. It is called GIS. Show some respect, ok? Leaflet is a good option. It is designed for mobile devices and it is free. But, it is JavaScript. If u really have to use windows control or require your app functional without cell signal, then I am sure u could find plenty of open source packages out there... [/quote] 抱歉我不算是职业做GIS的,我只做过几个项目,所以对我来说,它暂时也只能是“这玩意儿”,ArcGIS的客户端也是免费的,我用过WPF的SL的和WP的,如果是要实现楼主需要的这些需求,ArcGIS确实是我知道的最快的组件了。[/quote] ESRI never offers anything for free, as far as I know. In order to make ur client work, u will need server side support, wii u? If so, u will have to have both arcgis server and arcmap. Neither of them is free. If u are k12 or universities, these two are free but edn license is not free... I may worry too much, lz might be able to afford it... [/quote] 好吧,你觉得不靠谱,那理论上WP自带的MapControl一样可以做到我刚才说的那些,当然要自己虚拟一个地图数据源了,而且应该是没有无极缩放能力了。
  • 打赏
  • 举报
回复
引用 11 楼 vbfool 的回复:
[quote=引用 9 楼 micropentium6 的回复:] [quote=引用 1 楼 vbfool 的回复:] 如果是我,我就直接用ArcGIS的组件了。这玩意儿直接做确实烦。
Do u have idea how much arcgis could cost u? Besides, it is not "这玩意”. It is called GIS. Show some respect, ok? Leaflet is a good option. It is designed for mobile devices and it is free. But, it is JavaScript. If u really have to use windows control or require your app functional without cell signal, then I am sure u could find plenty of open source packages out there... [/quote] 抱歉我不算是职业做GIS的,我只做过几个项目,所以对我来说,它暂时也只能是“这玩意儿”,ArcGIS的客户端也是免费的,我用过WPF的SL的和WP的,如果是要实现楼主需要的这些需求,ArcGIS确实是我知道的最快的组件了。[/quote] ESRI never offers anything for free, as far as I know. In order to make ur client work, u will need server side support, wii u? If so, u will have to have both arcgis server and arcmap. Neither of them is free. If u are k12 or universities, these two are free but edn license is not free... I may worry too much, lz might be able to afford it...
vbfool 2014-08-06
  • 打赏
  • 举报
回复
引用 9 楼 micropentium6 的回复:
[quote=引用 1 楼 vbfool 的回复:] 如果是我,我就直接用ArcGIS的组件了。这玩意儿直接做确实烦。
Do u have idea how much arcgis could cost u? Besides, it is not "这玩意”. It is called GIS. Show some respect, ok? Leaflet is a good option. It is designed for mobile devices and it is free. But, it is JavaScript. If u really have to use windows control or require your app functional without cell signal, then I am sure u could find plenty of open source packages out there... [/quote] 抱歉我不算是职业做GIS的,我只做过几个项目,所以对我来说,它暂时也只能是“这玩意儿”,ArcGIS的客户端也是免费的,我用过WPF的SL的和WP的,如果是要实现楼主需要的这些需求,ArcGIS确实是我知道的最快的组件了。
tanqiyingk 2014-08-06
  • 打赏
  • 举报
回复
这是什么语言!
wangchenran 2014-08-05
  • 打赏
  • 举报
回复
引用 6 楼 vbfool 的回复:
https://www.nuget.org/packages/Esri.ArcGISRuntime.Toolkit/10.2.3.591-beta 嗯,应该是这个,这个是Runtime版的,WP8的还是原来那个
您应该做过ArcGIS for windowsphone 的开发吧 ? 有写过相关的博文吗?E文看起来不是很顺 - -
vbfool 2014-08-05
  • 打赏
  • 举报
回复
https://www.nuget.org/packages/Esri.ArcGISRuntime.Toolkit/10.2.3.591-beta 嗯,应该是这个,这个是Runtime版的,WP8的还是原来那个
vbfool 2014-08-05
  • 打赏
  • 举报
回复
所以说是用ArcGIS,相对来说最简单了,功能都给你做出来了,但是现今的8.1不知道有没有SDK,你可以用nuget搜一下看看
wangchenran 2014-08-05
  • 打赏
  • 举报
回复
引用 3 楼 vbfool 的回复:
这东西也是两句话说不清楚的啊,官网去看吧。
其实能找到一个支持自定义切图的地图SDK就够了 问题是 找不到啊! - -!
加载更多回复(3)

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧