Can we change the position of the logo? by default it is in the bottom right, i would like it to be on the top right of the map.
Layout of the logo
sebastien
Logo is rendered as DIV on the client side, so you can freely change its style on the client side.
Here is a solution for you, please paste this code in the head tag of the aspx page. Any questions please let me know.var OnMapCreating = function(map){
OpenLayers.Control.Logo = OpenLayers.Class(OpenLayers.Control.Logo, {
updateAttribution: function() {
if (this.map && this.innerHTML) {
this.div.style.right = "10px";
this.div.style.top = "10px";
this.div.innerHTML = this.innerHTML;
}
}});
}
Thanks,
Howard
that's great.
Though I have several other questions about the look and feel of the static element in the map.
As you can see in the image enclosed, is it possible to :
- hide the coordinates shown on the bottom right.
- hide the google legend : - hide the google logo - customise the scale legend (the color, italic or bold) is it a html dom element. what about the black lines showing the scale, is it images or html dom element, can we customise its appearance. thanks for your help Sebastien
Imagery (c)2009 TerraMetrics, Map data (c)2009 Tele Atlas - Terms of Use ?
Sebastien,
I think I cannot provide the second and the third question, for it is illegal using Google Map. A logo is a way for the owner of copyrighted material to publicize ownership as well as the provider information. Please see the following for the rest two questions.
1, the coordinates can be disabled by the following code; you can directly remove the code for it is false by default.Map1.MapTools.ScaleLine.Enabled = fasle;
4, customize the scale line is a little complicate.
4.1, If your requirement is not too complicated, please go to [Application Path]\Theme\Default\Style.css, you can find the definition of .olControlScaleLine, .olControlsScaleLineBottom and .olControlScaleLineTop which maintains the style of the current scale line.
4.2, If the style of the scale line cannot satisfy you, you can rewrite the scale line of OpenLayers.
Please let me know if you have any questions.
Thanks,
Howard
Based on what i understood, the coordinates are represented according to the projection used in the map module. If i use google for the background, the coordinates are in the google projection, if i use a custom wms the coordinates are in the defined projection.
How can i set the projection for the coordinates (ideally the geographic projection whatever the projection used in the map)
thanks in advance
sebastien
Sebastien,
The coordinates represented on the bottom right of the map is according to the MapUnits you are setting.
We have an online sample which switches the overlays between custom WMS and Google, you can find the coordinates are in Meter Unit.
websamples.thinkgeo.com/webe...ooWms.aspx
If it doesn’t make sense, please provide us more information for your query.
Thanks,
Howard