Friday, August 4, 2017

Control elements under control

The modified example with the infoblase, which only appears when you click on the marker, looks as follows


Connection lines


To create routes, you need connecting lines that are implemented through Polylines. For these lines, the Google Maps API uses SVG (Scalable Vector Graphics) or VML (Vector Markup Language) for the IE. Therefore, you must specify the VML namespace in the html start tag when you use polylines



Own icons


In the example, the line from point1 to point2, the color is # F00, the thickness is 3px, and the line is semitransparent. For the polylines, you determine the color, thickness, and degree of transparency. The connection lines count as the markers to the overlays, so you also use the addOverlay () method to add connection lines to the map. The following example shows the definition of points connected by a link line. Marks are then defined at both points, and the line is added to the map.


You want to replace the standard markers with your own? No problem. Before you go, however, it helps to look at the standard markers. You can get an overview of this simply by using the Firefox extension Web Developer Toolbar (https://addons.mozilla.org/en/firefox/addon/60).Use on a page with a map including the markup in the Webdeveloper menu Toolbar under Images the Display Picture Information sub-screen. Then you will see all the pictures used for the map and that several pictures are involved in the representation of the markers. In addition, it is clear that each Google map consists of several tiles, ie individual images. If you want to use your own icons, you have to create them first. You need


If you pass G_DEFAULT_ICON, it has the advantage that you do not have to define all the properties of the icon. If you do not specify a property, the default properties are used. Now you have to define the properties of the icon: Here you first enter the path to the image, then the path to the shadow


Then follow the paths to the two transparent GIF variants


Also define the size of the icon and its shadow


Now you determine the position at which the icon is to be anchored on the map


Finally, create the object with the options and define the new marker with the specified options.


You can then place this in the usual way with addOverlay () on the map


Link tips


Google Maps using an iframe into the website http://maps.google.com/help/maps/getmaps/quick.html Google Maps API documentation http://code.google.com/intl/apis/maps /documentation/index.html Blog about new and attractive apps from Google Maps http://googlemapsmania.blogspot.com/ Overview of useful icons for Google Maps


Http://mapki.com/index.php?title=Icon_Image_Sets


Use the Google Maps API to "move" to paintings http://www.thekremercollection.com/art/artists/Pieter-Verelst/The-schoolmaster-and-his-pupils/detail/


The next version of Google Maps - currently Google Lab http://code.google.com/apis/maps/documentation/v3/


But this is by no means all you can do with the Google Maps API: the interface can also be used with PHP / MySQL, for example, to program a branch finder. Or you use the Google Maps functionality - but with your own pictures as a material. So the Kremer Collection allows your visitors to navigate through the Google Maps API: zoom and view details, move the image excerpt - just like with Google Maps, except that it is a painting. And at the same time, the Google Maps API is working on the next version - version 3 - to provide improved mobile device support.


The icon itself (PNG format), a suitable shadow (PNG format), icon and shadow additionally as a transparent image - for the Internet Explorer 6 and for the expression

No comments:

Post a Comment