how to add a wms layer to a bing map using javascript? - javascript

how do I add a wms layer to a bing map using javascript? anyone know any good examples?

Typically I've used a proxy service that translates the quad key to the proper coordinates of the wms. A good start for writing such a proxy service in C# as a web handler can be found here: http://www.viawindowslive.com/Articles/VirtualEarth/AccessingWMSfromVirtualEarth.aspx
The problem lies in the way that bings maps requires you to specify a tile url. If you're not locked into bing maps, this sort of thing is much easier with Google Maps version 2.0 or Open layers as the above poster suggested.

if you have to use WMS for the tile server, then I would seriously look at OpenLayers.
This is excellent at mixing different toolkits and formats. Eg. putting KML overlays over WMS, or (as in your case) WMS over Bing Maps.
If you have your own choice of tile server and you have rasters, then I would use MapCruncher instead and load it natively in Bing Maps.

Related

Google maps api Javascript 3D map

I am working on a development in which I have implemented the google maps Javascript api. As far as working on the 2D map is all very clear and documented, but I would love to know if there is any option or possibility to transform the map into 3D view which allows me to see 3D buildings, change tilt in view ... etc. Is there such a possibility ?.
No, Google Maps API only gives access to the 2D maps as well as Streetview.
3D maps and Google Earth is only available in google apps or the maps.google.com solution.

How to integrate Geoserver into an application to serve points as layers

I am currently developing an application and it has a map portion where we have to load more than 10,000 points on a map. We are using Google Map Javascript API to display all these points as markers. What we have experienced is that it takes almost forever to get all of those points on the map and then again it mighty load on our server so most times we get a time-out.
We have thought of using Geoserver. Our approach is to connect/get a Geoserver plugin for MongoDB (that what we use in storing all the points) and then specify our data-source on Geoserver so that it can create a WMS layer for all the points we intend to load/display on a map.
What we have not figured out is how to Integrate Geoserver into our current solution
We have searched for possible implementations of a similar solution but found nothing that tells on how to integrate Geoserver into an application.
Please help if you do have a idea. Thanks

Google Maps api custom tiles for fictional video game world

I want to use the Google Maps v3 api to generate an interactive Google Map interface that uses custom tiles for a map from a video game. The app needs to be able to zoom-in out and display the proper tiles for each zoom level as well.
I'm looking for some resources or a tutorial on how to accomplish this. The Google Maps v3 API appears to only discuss using custom tiles that lay on top of the normal Google Maps tiles. That wouldn't make sense in my application since my map is for a fictional world and wouldn't line up with anything in the real world maps. Perhaps I'm just not seeing what I need in the API guide...
Check out the ImageMapType class in the reference. There's a nifty example showing Moon tiles.
One of my favourite applications is The Internet map, the developer wrote a pretty sweet article on how it was developed.
You need to either cut up your custom game map image into the appropriate file/directory structure that makes integration into Maps API easy (here's an example using Photoshop and some example HTML/JS code). Or use a more friendly tool like TileMill, but this expects data in a standard spatial data format and you probably don't have your game map stored in such a format. If you can go that route, they also provide a Node.js-based server called TileServe that makes integration a cinch.
If you are expecting a boatload of traffic, then maybe look at Google Maps Engine to host your custom game map image directly in Google's infrastructure.

how does the google maps identifies the roads(paths)?

when i went through the source code of the google maps page i've realized that the whole map is formed by small tiles of images. But how does the javascript identifies the roads on the google maps to show the way from ourlocation to destination??
I couldn't tell you HOW it works, it is a very complex application but all the work is done on the server and the reason the page shows the map as images is purely down to the limited ways in which a browser can display content.
Google have several layers with information about streets, roads, etc... when you use google maps only show a "graphical representation" of their data in bitmap format, but they need a "vectorial" layer that we don't see it.
Calculate routing is a very complex infraestructure problem in GIS server, for example, with Geoserver and PostGIS you can use Dijkstra Routing with Pgdijkstra.
It's very complex question, for a short answer.

Upgrading to v3 from v2 of google maps API, suggestions

I have full fledged integration of google maps version 2 in my web application, with features like get directions, cluster markers, tabbed info window, context menu(right click). The implementation has very poor design which is causing some problem, So now I need to revamp the core implementation to better design. I was thinking of upgrading to version 3 of google maps API. Please suggest, if that's a good thing to do and my all features will be running fine(or I will get replacement for all the features mentioned) in less time. Or should I stick to the version 2 of the google maps API?
I recommend you upgrade to v3. I upgraded my site a few months ago (and blogged about the experience). A few things to keep in mind:
No more API key.
The marker and info window API has changed, for the better.
No more AJAX helper stuff. If you are using GXMLHttp, you will need to swap over to a new AJAX wrapper (Jquery, mootools etc).
Check your lat/lngs are in the right order. GPoint takes x and y (longitude and latitude). v3 has a latlng object, so your params might be backwards.
Styled maps - You will be able to customize your color scheme in v3.
Don't think you can turn on the Google earth plugin in a single line of code like you could in v2 (not 100% on this, so please correct me if I am wrong).
Once you are done, you will be happy to make the change. Pages load faster, zooming is smoother (polyines scale as you zoom instead of disappearing) and the mobile experience is much better.

Categories