search for: getcenter

Displaying 8 results from an estimated 8 matches for "getcenter".

Did you mean: setcenter
2010 Jan 13
8
How to use getCenter
Hi, I am starting to use Mapstraction with the openlayers provider, and I am not sure how to retrieve the current center of a map in a cross-provider way. i.e. currently when calling map.getCenter(), the result returned is the openlayers internal one, not the long/lat used when calling setCenter(). Is that the expected behaviour? Regards, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstr...
2007 Mar 08
1
map not displayed after Ajax.updater request
...oad = addCodeToFunction(window.onload,function() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_div")); map.setCenter(new GLatLng(47.7500161647,-2.916641656), 8);GEvent.addListener(map,"click",function processMoveEndEvent () { var centerPoint = map.getCenter(); if (map.getZoom() <= 18) { processNewMapMovement()} }); map.addOverlay(contact); map.addOverlay(reference);map.addControl(new GSmallMapControl()); } }); </script> but that''s all.... no map displayed ... why any clue ? I already used it in other parts of my app without...
2009 Jun 01
0
[mapstraction commit] r12 - Implemented most Cloudmade functions. Still requires image, tile and KML/GeoRSS overlays
...ovider code - + map.addOverlay(pl); return pl; }, removePolyline: function(polyline) { var map = this.maps[this.api]; - - // TODO: Add provider code + map.removeOverlay(polyline.proprietary_polyline); }, getCenter: function() { - var point; var map = this.maps[this.api]; + var pt = map.getCenter(); - // TODO: Add provider code - - return point; + return new mxn.LatLonPoint(pt.lat(), pt.lng()); }, setCenter: function(po...
2007 Oct 16
3
can''t define custom GIcon
Hi, I am having trouble getting custom GIcons to display. Here is the code in my controller: @map = GMap.new("map_div") @map.control_init(:large_map => true,:map_type => true) @map.icon_global_init(GIcon.new(:image => "images/APBox-20.png "),"ap_none") infoString = "Friendly Name: "+result.friendly_name+
2009 May 31
7
[mapstraction commit] r11 - Added functionality to automatically load scripts needed.
...ent.getElementById(''events''); - var m = new mxn.Mapstraction(''map'', ''microsoft''); + var m = new mxn.Mapstraction(''map''); m.endPan.addHandler(function(sEvtName, oEvtSource, oEvtArgs){ var center = oEvtSource.getCenter(); @@ -136,7 +132,7 @@ { desc: ''Swap API'', action: function(){ - m.swap(''map'', ''google''); + m.swap(''map'', ''microsoft''); } },
2007 Mar 09
0
(no subject)
...IsCompatible()) { map = new GMap2(document.getElementById("map_div")); map.setCenter(new GLatLng(47.7377071331,-2.9257965088),10); map.setCenter(new GLatLng(47.7377071331,-2.9257965088), 10);GEvent.addListener(map,"click",function processMoveEndEvent() { var centerPoint = map.getCenter(); }); map.addOverlay(new GMarker(new GLatLng(47.7377071331,-2.9257965088), {title : "aabe307"})); map.addOverlay(new Clusterer([addDescriptionToMarker (addInfoWindowTabsToMarker(new GMarker(new GLatLng (47.6666508055,-2.9833339433),{title : "aad725",icon : icon_contact}), [...
2007 Mar 09
0
Clusterer
...()) { 166 map = new GMap2(document.getElementById("map_div")); 167 map.setCenter(new GLatLng(47.7377071331,-2.9257965088),10); 168 map.setCenter(new GLatLng(47.7377071331,-2.9257965088), 10);GEvent.addListener(map,"click",function processMoveEndEvent() { var centerPoint = map.getCenter(); }); 169 map.addOverlay(new Clusterer([addDescriptionToMarker (addInfoWindowTabsToMarker(new GMarker(new GLatLng (47.6666508055,-2.9833339433),{title : "aad725",icon : icon_contact}), [new GInfoWindowTab("Membre","pas de nom<br />aad725<br />Membre depuis...
2009 May 15
1
[PATCH server] First round of (largely) cosmetic changes to flexchart.
...;tick' in the center of the bar to which this label //corresponds var ind:Box = new Box(); - ind.opaqueBackground = 0x000000; - ind.width=1; - ind.height=3; + ind.width=2; + ind.height=4; ind.x = label.getCenter(); ind.y = 0; ind.setVisible(true); - ind.setStyle("backgroundColor","0x000000"); + ind.setStyle("backgroundColor",Constants.axisColorString); XAxisLabelArea.addChild(ind); + + lastDate = dataPoi...