Replacing Google Maps with Cloudmade map? - javascript

I'm trying to implement something like Paul Kulchenko's datamark:
http://notebook.kulchenko.com/maps/datamark
and I was wondering if there was a way to replace the Google Map with a Cloudmade one. I realize now that there's Google's Styled Maps tool, but I'd like to know of a Cloudmade map working with Google Maps API classes.
Thank you, and Happy Holidays!

Google Maps lets you place your own custom tile overlays on top of (or instead of) the default tiles. See http://code.google.com/apis/maps/documentation/javascript/overlays.html for documentation on this, or http://wiki.openstreetmap.org/wiki/Google_Maps_Example for some OSM specific examples.

Related

Take an image from google map

I have a problem with google map now. That is I dont know how to capture a picture from google map. I developed my app which used google map api ver3 and it can show multiple markers, lines, my app's icons, circles and many things like that. So, it's hard to use Google static map API url such as
maps.googleapis.com/maps/api/staticmap?center=Boston,MA
&visible=77+Massachusetts+Ave,Cambridge,MA%7CHarvard+Square,Cambridge,MA&size=512x512&sensor=true_or_false
Hope everyone there suggest any solution for me! Thank you !
P/S: I used google map v3, asp.net.

tiled textures across a google map in javascript

Using the google maps v3 javascript API, it's possible to add 'GroundOverlays' as a picture. Have a look here:
http://jsfiddle.net/9YYJB/1/
However, I'm working on a project where I'm trying to add a texture to the whole world map. Obviously I can add a single, absolutely massive gif/png overlay but I'd rather add a tiling texture. I've been digging around in the API and can't find any way to do this.
Anyone have any ideas on how this could be done?
Thanks very much
Yes, what you want to use is an image map type. This allows you to add tiles on top of the regular Google Base Map. If you want to completely replace the Google tiles, you would need to implement a Custom Map Type. My favorite example of that is the Liberty City Map.

add css to google maps v3 polylines?

is there any way to customise google maps v3 polylines
I think the only options mentioned are strokecolor, weight and opacity
http://code.google.com/apis/maps/documentation/javascript/reference.html#PolylineOptions
As far as I know, the only options to style Google's polyline are the ones presented in the documentation. There is no way to customize them further by default.
However, what might work is creating a custom polyline class where you can define everything you want, but this is connected to a lot of work. You would have to start by inheriting the OverlayView class and implement all the needed features (Maybe it does also work if you inherit Polyline and overwrite just the drawing methods - the problem is, you don't really know how the original source code looks like).
In fact, for Google Maps V2, Bill Chadwick did this. You can see a demonstration on his website (the dashed polyline example at the bottom). Maybe his implementation helps you to transfer it to Google Maps API V3.

Give different color to each country in google map

Does anyone know how to give a different color to each country in a google map?
e.g:
in the world map
Blue overlay to UK, then RED china...etc
I wonder if google provide API to give color to each country
Thanks
Using Google Maps this is really not easy, as #oezi said you would need to build overlays of every country you want to color, which frankly sounds like a mess.
But if you don't need all of the functionalities of Google Maps, perhaps you can use a Map Chart from the fantastic Google Chart Tools (aka Chart API). You can check and tinker with a working example of a Colored Map (among some others) in the interactive Chart Wizard
2017 UPDATE: This answer is quite old and as such the Map Charts API has been deprecated by Google. You can use the Geocharts from the Google Charts API instead:
https://developers.google.com/chart/interactive/docs/gallery/geochart
Hope this helps!
you may check this question,it's the same question you are asking.
How to color countries using google maps?
it's talking about google Geocharts in google maps.
there is a possibility to change the map style. and there is a very nice interactive example here - but, as far as i can see, it isn't possible to change the style of a specific country using this, so you'll have to build your own overlays using polygons.
First, find the shape file in .kml format. Tip: try googling "kml uk" or "kml china".
Once you have the KMLfile, host it somewhere and then call it as a var inside your Google Maps API initMap like this:
var myCustomRegion = new google.maps.KmlLayer({
url: 'FULL_URL_TO_YOUR_SHAPE_FILE',
map: map
});
Now your shape is laid into your map.
You can style the shape using the <LineStyle> and <PolyStyle> tags inside the KML file itself.

How to use anyother map like google maps in UIWebView in iphone?

I have done google map in UIWebView and it works perfectly with routing stuff and all. But now i want to load some other map into the WebView and get all the features that i get from google maps. How can i do it?
For eg: I want to load this one to the UIWebView. http://stage.discoveritalia.it/conbipel/ .This is an italian map. I want to use it in the same way as google maps works in an iphone app. Plz help me.
Since you are using normal web-based Google Maps in a UIWebView and not UIMapKit you approach this as any other Google Maps implementation using JavaScript.
The way this is done is by defining a custom map tile layer. See the Google Maps API documentation for custom tiles for more information.
Note that beside the actual programming, you need to have (and the rights to use) the actual map tiles as well.

Categories

Resources