tisdag 4 juli 2017

POGO RENT 3000 PART 2


In the first part, I described how to build for a robust GIS system. In this part I’ll move on to static maps and modules.

The Pogo Rent Website have a need to show a few non-interactive map images where it is great to Pogo. Moreover, the company also wants to send confirmation e-mails to customers who have booked a pogo. In the e-mail maps should be included showing great place to pogo in the area where they have rented the pogo.

Static Maps

Static maps are great. In many cases you just need to provide an image. You really don’t need an interactive map. Sometimes you just want to show a location, or a route between locations. For this purpose, static maps are great. So where does static maps fit in our solution? On our web site! We want to show spots where it is great to pogo. It is really easy to embed a static map. Just treat it as any image! For example
<img src="http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/-28.014407569005286,153.42029571533203/12?mapSize=200,200&key={BING KEY} />




The above will include an image on a web page that is 200x200px in size. Since it is an image it can be treated as an image. For example, put them in a slider. It is a bit tricky to get the URL correct, here is the documentation on MSDN https://msdn.microsoft.com/en-us/library/ff701724.aspx. And a 3rd party configuration tool is available online here http://staticmapmaker.com/bing/.
In the example site, I have just included static maps as images since it fits our purpose of showing where to pogo.

Modules

Modules is a pluggable technique to add functions to Bing Maps. In the demo site the GeoJSON module being used. There are a several modules, for a complete list see here, https://msdn.microsoft.com/en-us/library/dd877180.aspx. There is also an open source project for modules on Codeplex. The project is originally for Bing Maps v7 control, the good news is most of them works with v8 control. There is a compability list here https://bingmapsv7modules.codeplex.com/wikipage?title=Module%20Compatibility%20with%20Bing%20Maps%20V8.

Open source Modules


The v7 contral has an open source project for modules. I think the modules for v8 control should be released as Open Source, with a MIT-license. Modules extends the control and therefor it provides a great opportunity for developers to modify, enhance, extend modules to fill their needs. V7 control has a great project, I know many modules works for v8 control. Combining v7 modules and v8 modules would be a powerful combination. I think the modules have a place on GitHub like many other Bing Maps project from Microsoft. More over, I think Microsoft is the natural coordinator and organizer of such open source project. There is a risk that there will be modules spread in different repositories and no compilation of the modules.  The compiled list on Codeplex is really an asset. It also gives a hint of no of contributors that work in one place. So with this paragraph I really encourage to coordinate such project to keep the modules together.

The code is here on GITHUB and a live example temporary hosted here..

Inga kommentarer:

Skicka en kommentar