I have a map created in My Maps, and I wand to embed it in a website, however I'd like to have InfoWindows on marker click instead of the default side panel, and change the description a bit.
From what I found, the only way to do so is to use a regular Google Maps API and add my data onto it with a KML layer. This is working, however, the icons (the pins) are highly pixelated and look terrible. When using the same map via embed (or simply opening it) they are OK.
Would really appreciate any help with the issue. Probably there is another way of adding a custom map to an API-powered map?
The answer I've come up with is: no way to achieve what I'm looking for.
When exporting KML layers, Google scales all icons to 32X32 px, and then scales them up (kml file contains scale 1.1 directive). Even if you change the scale, the files remain 32X32, so it does not help; you need to create another files, in other words: the kml exported from Google is not usable if you have custom png icons.
I ended up using regular markers instead of KML layer.
Related
I need a lib recommendation or a solution that allows me to place a marker on a PNG, and save the marker location. The marker has to be a html/css element, allowing the user to click on the marker to open a new window or create a new marker (and save the X-Y loc).
"Why not use leaflet or google maps api?"
I cant use libs like leaflet because I need to use a user's uploaded image (can't be map tiles/layers), and the image can come in different sizes (but not big as a map)
My lack of knowledge made me think map libs wouldn't work for me, after a little research I found out leaflet do what I needed. I found a way to use leaflet without preprocessed map tiles. Basically What i've done so far. codepen.io/renanreddy/pen/bGYyQyV I guess thats what I was looking for. Still have the issue of "any image size", but its a start.
I want to control which types of roads show from this OSM highways list at various zoom levels.
I could not find the answer in the Leaflet docs. If you do, please link me.
edit:
Maybe i need to go one step back in the making stack and use one of these frameworks? http://wiki.openstreetmap.org/wiki/Frameworks#Generating_map_images
It is not possible to alter displayed map style in Leaflet.
Probably the fastest way to achieve your goal is:
Create your map style in Mabox Studio, where you will specify the road types to be displayed at various zoom levels. Mapbox will render the map tiles for you and expose them via URL.
then display the tiles created in Mapbox Studio in Leaflet (or Mapbox.js which is build above leaflet) simply by altering the map tiles URL you use when you initialize leaflet.
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.
We need to create a map of the small town from raster file. Our client deny usage of known API such as Google Maps, OSM, etc. There is little time before the deadline. What is the quickest way to create a small web map from the picture? Some kind of JavaScript framework?
Requires: drag, zoom and markers.
It is very desirable to do this without a big fat server such as MapServer or GeoServer, because we dont have a much time to redraw map in this format.
Absolutely easiest way is to create an OpenLayers map with Image layer. Here is an example of how it works.
Consider though that whole image is being loaded to the client before OpenLayers can manipulate it. So it's probably not the best option if it's a huge image.
Other option would be to create a tile pyramide with MapTiler which you can then simply host on your webserver(no need for MapServer or GeoServer) and then use TileCache layer in OpenLayers to display tiles on map. MapTiler creates OpenLayers example with all necessary settings when you tile image with it.
I would like to do something like what is shown in the screenshot - http://themanyfacesof.com/wp-content/uploads/2010/03/map.png
I want to be able to highlight certain areas on a map using PHP as a server side technology and jQuery(preferable) on client side with some tooltip functionality. Is there anything available or any idea how this could be achieved with the complexity involved?
Completely client-side solution: http://jvectormap.owl-hollow.net/
Look into using Google Maps for this. You can overlay lines and polygons which effectively means you can do anything - for example Loughbrough University does this.
A good way to start is to
Log in to Google
Go to Google Maps, then to my maps and create a new map
Draw polygons and line using the tools provided
Right click and copy the link for Google Earth, visit this link but change the output to KML output=kml. KML is just like XML
You now have a file with the exported polygons and lines that you drew. You can then re-draw these onto a Google Map programmatically
I did this the other day to get some rather complex polygons drawn onto a map without having to trial and error the latitude and longitude coordinates for them.
Hope that helps.