Hello List, Either I have found a memory leak or I am doing something wrong(most likely). In our application we have about 1000 markers, these change on a regular basis. I haven''t found a way to search the markers to only change the markers that have changed state, so every time one marker needs to be updated, all the markers get redrawn. Now I have provided a test case, below, so you can see what I have done wrong. I have tried this with Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded the browser memory usage keeps growing. Thanks in advance, Craig Spry code below this line ------------------------------------------------------------------------------------------------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Memory Leak Test</title> <script src="http://openlayers.org/api/OpenLayers.js"></script> <script type="text/javascript" charset="utf-8" src=" http://mapstraction.com/mapstraction-js/mapstraction.js"></script> <script type="text/javascript"> var mapstraction; var markersArray; function initialize() { mapstraction = new Mapstraction(''map_canvas'',''openlayers''); var myPoint = new LatLonPoint(37.404196,-122.008194); mapstraction.setCenterAndZoom(myPoint, 4); mapstraction.addControls({ pan: true, zoom: ''small'', map_type: true }); my_marker = new Marker(myPoint); markersArray = new Array(); my_marker.setIcon(''http://mapstraction.com/icon.gif''); mapstraction.addMarker( new Marker( new LatLonPoint(37.75,-122.44))); mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); // add a label to the marker my_marker.setLabel("<blink>Hello!</blink>"); var text = "<b>Be Happy!</b>"; // add info bubble to the marker my_marker.setInfoBubble(text); // display marker mapstraction.addMarker(my_marker); var foo = function() { mapstraction.removeMarker(my_marker); }; } function addMarkers() { lat = 37.85; lon = -122.44; mapstraction.removeAllMarkers() for(i=0;i<1000;++i) { var latLon = new LatLonPoint(lat,lon); var markerM = new Marker( latLon); mapstraction.addMarker( markerM, true); markerM = null; latLon = null; lat = lat + 0.01; lon = lon + 0.01; } } setInterval(addMarkers, 3000); </script> </head> <body onload="initialize()" style="font-family: Arial;border: 0 none;"> <H2>Map test</H2> <div id="map_canvas" style="width: 100%; height: 400px"></div> </body> </html> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090902/003b15e4/attachment.htm>
Thanks for the report Craig. I know there were some bugs in the first version of Mapstraction. We''re building out Mapstraction v2 - (and it''s being used in production sites) so that would be my first suggestion to try. You can download it from: http://code.google.com/p/mapstraction/ And here is an example: http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html The API itself is the same - you primarily just need to change the include files. Let us know how that goes. Andrew On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> wrote:> Hello List, > Either I have found a memory leak or I am doing something wrong(most > likely). ?In our application we have about 1000 markers, these change on a > regular basis. ?I haven''t found a way to search the markers to only change > the markers that have changed state, so every time one marker needs to be > updated, all the markers get redrawn. ?Now I have provided a test > case,?below,?so you can see what I have done wrong. ?I have tried this with > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded the > browser memory usage keeps growing. > Thanks in advance, > Craig Spry > code below this line > ------------------------------------------------------------------------------------------------------------------------------------------- > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:v="urn:schemas-microsoft-com:vml"> > ??<head> > ?? ?<meta http-equiv="content-type" content="text/html; charset=utf-8"/> > ?? ?<title>Memory Leak Test</title> > ?? ?<script src="http://openlayers.org/api/OpenLayers.js"></script> > ?? ?<script type="text/javascript" charset="utf-8" > src="http://mapstraction.com/mapstraction-js/mapstraction.js"></script> > ?? ?<script type="text/javascript"> > var mapstraction; > var markersArray; > ?? ?function initialize() { > > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); > ?? ? ? ?var myPoint = new LatLonPoint(37.404196,-122.008194); > ?? ? ? ?mapstraction.setCenterAndZoom(myPoint, 4); > ?? ? ? ?mapstraction.addControls({ > ?? ? ? ? ? ?pan: true, > ?? ? ? ? ? ?zoom: ''small'', > ?? ? ? ? ? ?map_type: true > ?? ? ? ?}); > ?? ? ? ?my_marker = new Marker(myPoint); > > markersArray = new Array(); > ?? ? ? ?my_marker.setIcon(''http://mapstraction.com/icon.gif''); > > ?? ? ? ?mapstraction.addMarker( new Marker( new > LatLonPoint(37.75,-122.44))); > mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); > ?? ? ? ?// add a label to the marker > ?? ? ? ?my_marker.setLabel("<blink>Hello!</blink>"); > ?? ? ? ?var text = "<b>Be Happy!</b>"; > > ?? ? ? ?// add info bubble to the marker > ?? ? ? ?my_marker.setInfoBubble(text); > > ?? ? ? ?// display marker > ?? ? ? ?mapstraction.addMarker(my_marker); > ?? ? ? ?var foo = function() { mapstraction.removeMarker(my_marker); }; > > ?? ?} > > function addMarkers() > { > lat = 37.85; > lon = -122.44; > > mapstraction.removeAllMarkers() > for(i=0;i<1000;++i) > { > var latLon = new LatLonPoint(lat,lon); > var markerM = new Marker( latLon); > mapstraction.addMarker( markerM, true); > markerM = null; > latLon = null; > lat = lat + 0.01; > lon = lon + 0.01; > } > } > setInterval(addMarkers, 3000); > ?? ?</script> > ??</head> > ??<body onload="initialize()" style="font-family: Arial;border: 0 none;"> > ??<H2>Map test</H2> > ?? ?<div id="map_canvas" style="width: 100%; height: 400px"></div> > ??</body> > </html> > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Andrew Turner mobile: 248.982.3609 andrew at fortiusone.com http://highearthorbit.com http://geocommons.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
We use http://www.openstreetmap.org/ as our source for maps and looking at what you have in v2, it doesn''t look like the open street maps and/or open layers has been implemented yet, is this right or have I missed something? Regards, Craig Spry On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner <andrew at highearthorbit.com>wrote:> Thanks for the report Craig. I know there were some bugs in the first > version of Mapstraction. We''re building out Mapstraction v2 - (and > it''s being used in production sites) so that would be my first > suggestion to try. > > You can download it from: > http://code.google.com/p/mapstraction/ > > And here is an example: > > http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html > > The API itself is the same - you primarily just need to change the > include files. > > Let us know how that goes. > > Andrew > > > > On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> wrote: > > Hello List, > > Either I have found a memory leak or I am doing something wrong(most > > likely). In our application we have about 1000 markers, these change on > a > > regular basis. I haven''t found a way to search the markers to only > change > > the markers that have changed state, so every time one marker needs to be > > updated, all the markers get redrawn. Now I have provided a test > > case, below, so you can see what I have done wrong. I have tried this > with > > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded the > > browser memory usage keeps growing. > > Thanks in advance, > > Craig Spry > > code below this line > > > ------------------------------------------------------------------------------------------------------------------------------------------- > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" > > xmlns:v="urn:schemas-microsoft-com:vml"> > > <head> > > <meta http-equiv="content-type" content="text/html; charset=utf-8"/> > > <title>Memory Leak Test</title> > > <script src="http://openlayers.org/api/OpenLayers.js"></script> > > <script type="text/javascript" charset="utf-8" > > src="http://mapstraction.com/mapstraction-js/mapstraction.js"></script> > > <script type="text/javascript"> > > var mapstraction; > > var markersArray; > > function initialize() { > > > > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); > > var myPoint = new LatLonPoint(37.404196,-122.008194); > > mapstraction.setCenterAndZoom(myPoint, 4); > > mapstraction.addControls({ > > pan: true, > > zoom: ''small'', > > map_type: true > > }); > > my_marker = new Marker(myPoint); > > > > markersArray = new Array(); > > my_marker.setIcon(''http://mapstraction.com/icon.gif''); > > > > mapstraction.addMarker( new Marker( new > > LatLonPoint(37.75,-122.44))); > > mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); > > // add a label to the marker > > my_marker.setLabel("<blink>Hello!</blink>"); > > var text = "<b>Be Happy!</b>"; > > > > // add info bubble to the marker > > my_marker.setInfoBubble(text); > > > > // display marker > > mapstraction.addMarker(my_marker); > > var foo = function() { mapstraction.removeMarker(my_marker); }; > > > > } > > > > function addMarkers() > > { > > lat = 37.85; > > lon = -122.44; > > > > mapstraction.removeAllMarkers() > > for(i=0;i<1000;++i) > > { > > var latLon = new LatLonPoint(lat,lon); > > var markerM = new Marker( latLon); > > mapstraction.addMarker( markerM, true); > > markerM = null; > > latLon = null; > > lat = lat + 0.01; > > lon = lon + 0.01; > > } > > } > > setInterval(addMarkers, 3000); > > </script> > > </head> > > <body onload="initialize()" style="font-family: Arial;border: 0 none;"> > > <H2>Map test</H2> > > <div id="map_canvas" style="width: 100%; height: 400px"></div> > > </body> > > </html> > > > > _______________________________________________ > > Mapstraction mailing list > > Mapstraction at lists.mapstraction.com > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > > > > > > -- > Andrew Turner > mobile: 248.982.3609 > andrew at fortiusone.com > http://highearthorbit.com > > http://geocommons.com Helping build the Geospatial Web > Introduction to Neogeography - http://oreilly.com/catalog/neogeography >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090902/07aa1fdb/attachment-0001.htm>
Hi Craig, you are correct v2 doesn''t yet support openstreetmap. One issue here is that (to my knowledge - please correct me if I''m wrong) there is no OSM javascript library for embedding maps in pages. In the past we''ve done it by using the Google javascript and adding OSM as a tile layer. This works, but has the downside of meaning you need to display a Google logo since you''re using their code. So it''s a bit confusing to users as to whether they are getting an OSM or a Google map. 2 options for you 1. use Cloudmade, which is OSM data rendered by Cloudmade - see http://cloudmade.com 2. help add support for OSM. My only other comment, as someone who''s active in OSM, would be that OSM, due to it''s volunteer nature, doesn''t provide any sort of SLA. A few weeks ago for example the OSM site was down for 2 days due to maintenance. Whether or not that''s a problem for you I guess depends on the nature of the service you''re building. good luck and thanks for your help On Wed, Sep 2, 2009 at 06:27, Craig Spry <craig.spry at gmail.com> wrote:> We use http://www.openstreetmap.org/ as our source for maps and looking at > what you have in v2, it doesn''t look like the open street maps and/or open > layers has been implemented yet, is this right or have I missed something? > Regards, > Craig Spry > > On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner <andrew at highearthorbit.com>wrote: > >> Thanks for the report Craig. I know there were some bugs in the first >> version of Mapstraction. We''re building out Mapstraction v2 - (and >> it''s being used in production sites) so that would be my first >> suggestion to try. >> >> You can download it from: >> http://code.google.com/p/mapstraction/ >> >> And here is an example: >> >> http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html >> >> The API itself is the same - you primarily just need to change the >> include files. >> >> Let us know how that goes. >> >> Andrew >> >> >> >> On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> wrote: >> > Hello List, >> > Either I have found a memory leak or I am doing something wrong(most >> > likely). In our application we have about 1000 markers, these change on >> a >> > regular basis. I haven''t found a way to search the markers to only >> change >> > the markers that have changed state, so every time one marker needs to >> be >> > updated, all the markers get redrawn. Now I have provided a test >> > case, below, so you can see what I have done wrong. I have tried this >> with >> > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded the >> > browser memory usage keeps growing. >> > Thanks in advance, >> > Craig Spry >> > code below this line >> > >> ------------------------------------------------------------------------------------------------------------------------------------------- >> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >> > <html xmlns="http://www.w3.org/1999/xhtml" >> > xmlns:v="urn:schemas-microsoft-com:vml"> >> > <head> >> > <meta http-equiv="content-type" content="text/html; charset=utf-8"/> >> > <title>Memory Leak Test</title> >> > <script src="http://openlayers.org/api/OpenLayers.js"></script> >> > <script type="text/javascript" charset="utf-8" >> > src="http://mapstraction.com/mapstraction-js/mapstraction.js"></script> >> > <script type="text/javascript"> >> > var mapstraction; >> > var markersArray; >> > function initialize() { >> > >> > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); >> > var myPoint = new LatLonPoint(37.404196,-122.008194); >> > mapstraction.setCenterAndZoom(myPoint, 4); >> > mapstraction.addControls({ >> > pan: true, >> > zoom: ''small'', >> > map_type: true >> > }); >> > my_marker = new Marker(myPoint); >> > >> > markersArray = new Array(); >> > my_marker.setIcon(''http://mapstraction.com/icon.gif''<http://mapstraction.com/icon.gif%27> >> ); >> > >> > mapstraction.addMarker( new Marker( new >> > LatLonPoint(37.75,-122.44))); >> > mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); >> > // add a label to the marker >> > my_marker.setLabel("<blink>Hello!</blink>"); >> > var text = "<b>Be Happy!</b>"; >> > >> > // add info bubble to the marker >> > my_marker.setInfoBubble(text); >> > >> > // display marker >> > mapstraction.addMarker(my_marker); >> > var foo = function() { mapstraction.removeMarker(my_marker); }; >> > >> > } >> > >> > function addMarkers() >> > { >> > lat = 37.85; >> > lon = -122.44; >> > >> > mapstraction.removeAllMarkers() >> > for(i=0;i<1000;++i) >> > { >> > var latLon = new LatLonPoint(lat,lon); >> > var markerM = new Marker( latLon); >> > mapstraction.addMarker( markerM, true); >> > markerM = null; >> > latLon = null; >> > lat = lat + 0.01; >> > lon = lon + 0.01; >> > } >> > } >> > setInterval(addMarkers, 3000); >> > </script> >> > </head> >> > <body onload="initialize()" style="font-family: Arial;border: 0 >> none;"> >> > <H2>Map test</H2> >> > <div id="map_canvas" style="width: 100%; height: 400px"></div> >> > </body> >> > </html> >> > >> > _______________________________________________ >> > Mapstraction mailing list >> > Mapstraction at lists.mapstraction.com >> > >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > >> > >> >> >> >> -- >> Andrew Turner >> mobile: 248.982.3609 >> andrew at fortiusone.com >> http://highearthorbit.com >> >> http://geocommons.com Helping build the Geospatial Web >> Introduction to Neogeography - http://oreilly.com/catalog/neogeography >> > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090902/95ffe1b2/attachment.htm>
On Wed, Sep 2, 2009 at 3:28 AM, Ed Freyfogle<edf at sloan.mit.edu> wrote:> Hi Craig, > > you are correct v2 doesn''t yet support openstreetmap. One issue here is that > (to my knowledge - please correct me if I''m wrong) there is no OSM > javascript library for embedding maps in pages. In the past we''ve done it by > using the Google javascript and adding OSM as a tile layer. This works, but > has the downside of meaning you need to display a Google logo since you''re > using their code. So it''s a bit confusing to users as to whether they are > getting an OSM or a Google map.In v1 - the "OpenLayers" provider used OSM tiles by default. It should be straight-forward to add OpenLayers provider. Also - as Ed mentions, CloudMade support is already in v2.> > 2 options for you > 1. use Cloudmade, which is OSM data rendered by Cloudmade - see > http://cloudmade.com > 2. help add support for OSM. > > My only other comment, as someone who''s active in OSM, would be that OSM, > due to it''s volunteer nature, doesn''t provide any sort of SLA. A few weeks > ago for example the OSM site was down for 2 days due to maintenance. Whether > or not that''s a problem for you I guess depends on the nature of the service > you''re building. > > good luck and thanks for your help > > > On Wed, Sep 2, 2009 at 06:27, Craig Spry <craig.spry at gmail.com> wrote: >> >> We use?http://www.openstreetmap.org/?as our source for maps and looking at >> what you have in v2, it doesn''t look like the open street maps and/or open >> layers has been implemented yet, is this right or have I missed something? >> Regards, >> Craig Spry >> On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner <andrew at highearthorbit.com> >> wrote: >>> >>> Thanks ?for the report Craig. I know there were some bugs in the first >>> version of Mapstraction. We''re building out Mapstraction v2 - (and >>> it''s being used in production sites) so that would be my first >>> suggestion to try. >>> >>> You can download it from: >>> http://code.google.com/p/mapstraction/ >>> >>> And here is an example: >>> >>> http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html >>> >>> The API itself is the same - you primarily just need to change the >>> include files. >>> >>> Let us know how that goes. >>> >>> Andrew >>> >>> >>> >>> On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> wrote: >>> > Hello List, >>> > Either I have found a memory leak or I am doing something wrong(most >>> > likely). ?In our application we have about 1000 markers, these change >>> > on a >>> > regular basis. ?I haven''t found a way to search the markers to only >>> > change >>> > the markers that have changed state, so every time one marker needs to >>> > be >>> > updated, all the markers get redrawn. ?Now I have provided a test >>> > case,?below,?so you can see what I have done wrong. ?I have tried this >>> > with >>> > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded the >>> > browser memory usage keeps growing. >>> > Thanks in advance, >>> > Craig Spry >>> > code below this line >>> > >>> > ------------------------------------------------------------------------------------------------------------------------------------------- >>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >>> > <html xmlns="http://www.w3.org/1999/xhtml" >>> > xmlns:v="urn:schemas-microsoft-com:vml"> >>> > ??<head> >>> > ?? ?<meta http-equiv="content-type" content="text/html; >>> > charset=utf-8"/> >>> > ?? ?<title>Memory Leak Test</title> >>> > ?? ?<script src="http://openlayers.org/api/OpenLayers.js"></script> >>> > ?? ?<script type="text/javascript" charset="utf-8" >>> > src="http://mapstraction.com/mapstraction-js/mapstraction.js"></script> >>> > ?? ?<script type="text/javascript"> >>> > var mapstraction; >>> > var markersArray; >>> > ?? ?function initialize() { >>> > >>> > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); >>> > ?? ? ? ?var myPoint = new LatLonPoint(37.404196,-122.008194); >>> > ?? ? ? ?mapstraction.setCenterAndZoom(myPoint, 4); >>> > ?? ? ? ?mapstraction.addControls({ >>> > ?? ? ? ? ? ?pan: true, >>> > ?? ? ? ? ? ?zoom: ''small'', >>> > ?? ? ? ? ? ?map_type: true >>> > ?? ? ? ?}); >>> > ?? ? ? ?my_marker = new Marker(myPoint); >>> > >>> > markersArray = new Array(); >>> > ?? ? ? ?my_marker.setIcon(''http://mapstraction.com/icon.gif''); >>> > >>> > ?? ? ? ?mapstraction.addMarker( new Marker( new >>> > LatLonPoint(37.75,-122.44))); >>> > mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); >>> > ?? ? ? ?// add a label to the marker >>> > ?? ? ? ?my_marker.setLabel("<blink>Hello!</blink>"); >>> > ?? ? ? ?var text = "<b>Be Happy!</b>"; >>> > >>> > ?? ? ? ?// add info bubble to the marker >>> > ?? ? ? ?my_marker.setInfoBubble(text); >>> > >>> > ?? ? ? ?// display marker >>> > ?? ? ? ?mapstraction.addMarker(my_marker); >>> > ?? ? ? ?var foo = function() { mapstraction.removeMarker(my_marker); }; >>> > >>> > ?? ?} >>> > >>> > function addMarkers() >>> > { >>> > lat = 37.85; >>> > lon = -122.44; >>> > >>> > mapstraction.removeAllMarkers() >>> > for(i=0;i<1000;++i) >>> > { >>> > var latLon = new LatLonPoint(lat,lon); >>> > var markerM = new Marker( latLon); >>> > mapstraction.addMarker( markerM, true); >>> > markerM = null; >>> > latLon = null; >>> > lat = lat + 0.01; >>> > lon = lon + 0.01; >>> > } >>> > } >>> > setInterval(addMarkers, 3000); >>> > ?? ?</script> >>> > ??</head> >>> > ??<body onload="initialize()" style="font-family: Arial;border: 0 >>> > none;"> >>> > ??<H2>Map test</H2> >>> > ?? ?<div id="map_canvas" style="width: 100%; height: 400px"></div> >>> > ??</body> >>> > </html> >>> > >>> > _______________________________________________ >>> > Mapstraction mailing list >>> > Mapstraction at lists.mapstraction.com >>> > >>> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> > >>> > >>> >>> >>> >>> -- >>> Andrew Turner >>> mobile: 248.982.3609 >>> andrew at fortiusone.com >>> http://highearthorbit.com >>> >>> http://geocommons.com ? ? ? ? ? Helping build the Geospatial Web >>> Introduction to Neogeography - http://oreilly.com/catalog/neogeography >> >> >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Andrew Turner mobile: 248.982.3609 andrew at fortiusone.com http://highearthorbit.com http://geocommons.com Helping build the Geospatial Web Introduction to Neogeography - http://oreilly.com/catalog/neogeography
I think I might do an OpenLayers provider, I''ll see if I can get some time to do it over the weekend, if I manage to do it I will contribute it so other people can use it. Craig On Wed, Sep 2, 2009 at 10:59 PM, Andrew Turner <andrew at highearthorbit.com>wrote:> On Wed, Sep 2, 2009 at 3:28 AM, Ed Freyfogle<edf at sloan.mit.edu> wrote: > > Hi Craig, > > > > you are correct v2 doesn''t yet support openstreetmap. One issue here is > that > > (to my knowledge - please correct me if I''m wrong) there is no OSM > > javascript library for embedding maps in pages. In the past we''ve done it > by > > using the Google javascript and adding OSM as a tile layer. This works, > but > > has the downside of meaning you need to display a Google logo since > you''re > > using their code. So it''s a bit confusing to users as to whether they are > > getting an OSM or a Google map. > > In v1 - the "OpenLayers" provider used OSM tiles by default. It should > be straight-forward to add OpenLayers provider. > > Also - as Ed mentions, CloudMade support is already in v2. > > > > > 2 options for you > > 1. use Cloudmade, which is OSM data rendered by Cloudmade - see > > http://cloudmade.com > > 2. help add support for OSM. > > > > My only other comment, as someone who''s active in OSM, would be that OSM, > > due to it''s volunteer nature, doesn''t provide any sort of SLA. A few > weeks > > ago for example the OSM site was down for 2 days due to maintenance. > Whether > > or not that''s a problem for you I guess depends on the nature of the > service > > you''re building. > > > > good luck and thanks for your help > > > > > > On Wed, Sep 2, 2009 at 06:27, Craig Spry <craig.spry at gmail.com> wrote: > >> > >> We use http://www.openstreetmap.org/ as our source for maps and looking > at > >> what you have in v2, it doesn''t look like the open street maps and/or > open > >> layers has been implemented yet, is this right or have I missed > something? > >> Regards, > >> Craig Spry > >> On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner < > andrew at highearthorbit.com> > >> wrote: > >>> > >>> Thanks for the report Craig. I know there were some bugs in the first > >>> version of Mapstraction. We''re building out Mapstraction v2 - (and > >>> it''s being used in production sites) so that would be my first > >>> suggestion to try. > >>> > >>> You can download it from: > >>> http://code.google.com/p/mapstraction/ > >>> > >>> And here is an example: > >>> > >>> > http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html > >>> > >>> The API itself is the same - you primarily just need to change the > >>> include files. > >>> > >>> Let us know how that goes. > >>> > >>> Andrew > >>> > >>> > >>> > >>> On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> > wrote: > >>> > Hello List, > >>> > Either I have found a memory leak or I am doing something wrong(most > >>> > likely). In our application we have about 1000 markers, these change > >>> > on a > >>> > regular basis. I haven''t found a way to search the markers to only > >>> > change > >>> > the markers that have changed state, so every time one marker needs > to > >>> > be > >>> > updated, all the markers get redrawn. Now I have provided a test > >>> > case, below, so you can see what I have done wrong. I have tried > this > >>> > with > >>> > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded > the > >>> > browser memory usage keeps growing. > >>> > Thanks in advance, > >>> > Craig Spry > >>> > code below this line > >>> > > >>> > > ------------------------------------------------------------------------------------------------------------------------------------------- > >>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > >>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > >>> > <html xmlns="http://www.w3.org/1999/xhtml" > >>> > xmlns:v="urn:schemas-microsoft-com:vml"> > >>> > <head> > >>> > <meta http-equiv="content-type" content="text/html; > >>> > charset=utf-8"/> > >>> > <title>Memory Leak Test</title> > >>> > <script src="http://openlayers.org/api/OpenLayers.js"></script> > >>> > <script type="text/javascript" charset="utf-8" > >>> > src="http://mapstraction.com/mapstraction-js/mapstraction.js > "></script> > >>> > <script type="text/javascript"> > >>> > var mapstraction; > >>> > var markersArray; > >>> > function initialize() { > >>> > > >>> > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); > >>> > var myPoint = new LatLonPoint(37.404196,-122.008194); > >>> > mapstraction.setCenterAndZoom(myPoint, 4); > >>> > mapstraction.addControls({ > >>> > pan: true, > >>> > zoom: ''small'', > >>> > map_type: true > >>> > }); > >>> > my_marker = new Marker(myPoint); > >>> > > >>> > markersArray = new Array(); > >>> > my_marker.setIcon(''http://mapstraction.com/icon.gif''); > >>> > > >>> > mapstraction.addMarker( new Marker( new > >>> > LatLonPoint(37.75,-122.44))); > >>> > mapstraction.addMarker( new Marker( new LatLonPoint(37.65,-122.44))); > >>> > // add a label to the marker > >>> > my_marker.setLabel("<blink>Hello!</blink>"); > >>> > var text = "<b>Be Happy!</b>"; > >>> > > >>> > // add info bubble to the marker > >>> > my_marker.setInfoBubble(text); > >>> > > >>> > // display marker > >>> > mapstraction.addMarker(my_marker); > >>> > var foo = function() { mapstraction.removeMarker(my_marker); > }; > >>> > > >>> > } > >>> > > >>> > function addMarkers() > >>> > { > >>> > lat = 37.85; > >>> > lon = -122.44; > >>> > > >>> > mapstraction.removeAllMarkers() > >>> > for(i=0;i<1000;++i) > >>> > { > >>> > var latLon = new LatLonPoint(lat,lon); > >>> > var markerM = new Marker( latLon); > >>> > mapstraction.addMarker( markerM, true); > >>> > markerM = null; > >>> > latLon = null; > >>> > lat = lat + 0.01; > >>> > lon = lon + 0.01; > >>> > } > >>> > } > >>> > setInterval(addMarkers, 3000); > >>> > </script> > >>> > </head> > >>> > <body onload="initialize()" style="font-family: Arial;border: 0 > >>> > none;"> > >>> > <H2>Map test</H2> > >>> > <div id="map_canvas" style="width: 100%; height: 400px"></div> > >>> > </body> > >>> > </html> > >>> > > >>> > _______________________________________________ > >>> > Mapstraction mailing list > >>> > Mapstraction at lists.mapstraction.com > >>> > > >>> > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >>> > > >>> > > >>> > >>> > >>> > >>> -- > >>> Andrew Turner > >>> mobile: 248.982.3609 > >>> andrew at fortiusone.com > >>> http://highearthorbit.com > >>> > >>> http://geocommons.com Helping build the Geospatial Web > >>> Introduction to Neogeography - http://oreilly.com/catalog/neogeography > >> > >> > >> _______________________________________________ > >> Mapstraction mailing list > >> Mapstraction at lists.mapstraction.com > >> > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >> > > > > > > _______________________________________________ > > Mapstraction mailing list > > Mapstraction at lists.mapstraction.com > > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > > > > > > > > -- > Andrew Turner > mobile: 248.982.3609 > andrew at fortiusone.com > http://highearthorbit.com > > http://geocommons.com Helping build the Geospatial Web > Introduction to Neogeography - http://oreilly.com/catalog/neogeography >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090903/68c34af9/attachment.htm>
Just out of interest - have you tried running that code directly on the OpenLayers API? It''s possible the memory leak isn''t in Mapstraction but if it is it would be good to get it sorted and make sure it''s not made it into v2. Derek 2009/9/3 Craig Spry <craig.spry at gmail.com>> I think I might do an OpenLayers provider, I''ll see if I can get some time > to do it over the weekend, if I manage to do it I will contribute it so > other people can use it. > Craig > > > On Wed, Sep 2, 2009 at 10:59 PM, Andrew Turner <andrew at highearthorbit.com>wrote: > >> On Wed, Sep 2, 2009 at 3:28 AM, Ed Freyfogle<edf at sloan.mit.edu> wrote: >> > Hi Craig, >> > >> > you are correct v2 doesn''t yet support openstreetmap. One issue here is >> that >> > (to my knowledge - please correct me if I''m wrong) there is no OSM >> > javascript library for embedding maps in pages. In the past we''ve done >> it by >> > using the Google javascript and adding OSM as a tile layer. This works, >> but >> > has the downside of meaning you need to display a Google logo since >> you''re >> > using their code. So it''s a bit confusing to users as to whether they >> are >> > getting an OSM or a Google map. >> >> In v1 - the "OpenLayers" provider used OSM tiles by default. It should >> be straight-forward to add OpenLayers provider. >> >> Also - as Ed mentions, CloudMade support is already in v2. >> >> > >> > 2 options for you >> > 1. use Cloudmade, which is OSM data rendered by Cloudmade - see >> > http://cloudmade.com >> > 2. help add support for OSM. >> > >> > My only other comment, as someone who''s active in OSM, would be that >> OSM, >> > due to it''s volunteer nature, doesn''t provide any sort of SLA. A few >> weeks >> > ago for example the OSM site was down for 2 days due to maintenance. >> Whether >> > or not that''s a problem for you I guess depends on the nature of the >> service >> > you''re building. >> > >> > good luck and thanks for your help >> > >> > >> > On Wed, Sep 2, 2009 at 06:27, Craig Spry <craig.spry at gmail.com> wrote: >> >> >> >> We use http://www.openstreetmap.org/ as our source for maps and >> looking at >> >> what you have in v2, it doesn''t look like the open street maps and/or >> open >> >> layers has been implemented yet, is this right or have I missed >> something? >> >> Regards, >> >> Craig Spry >> >> On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner < >> andrew at highearthorbit.com> >> >> wrote: >> >>> >> >>> Thanks for the report Craig. I know there were some bugs in the first >> >>> version of Mapstraction. We''re building out Mapstraction v2 - (and >> >>> it''s being used in production sites) so that would be my first >> >>> suggestion to try. >> >>> >> >>> You can download it from: >> >>> http://code.google.com/p/mapstraction/ >> >>> >> >>> And here is an example: >> >>> >> >>> >> http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html >> >>> >> >>> The API itself is the same - you primarily just need to change the >> >>> include files. >> >>> >> >>> Let us know how that goes. >> >>> >> >>> Andrew >> >>> >> >>> >> >>> >> >>> On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> >> wrote: >> >>> > Hello List, >> >>> > Either I have found a memory leak or I am doing something wrong(most >> >>> > likely). In our application we have about 1000 markers, these >> change >> >>> > on a >> >>> > regular basis. I haven''t found a way to search the markers to only >> >>> > change >> >>> > the markers that have changed state, so every time one marker needs >> to >> >>> > be >> >>> > updated, all the markers get redrawn. Now I have provided a test >> >>> > case, below, so you can see what I have done wrong. I have tried >> this >> >>> > with >> >>> > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded >> the >> >>> > browser memory usage keeps growing. >> >>> > Thanks in advance, >> >>> > Craig Spry >> >>> > code below this line >> >>> > >> >>> > >> ------------------------------------------------------------------------------------------------------------------------------------------- >> >>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >> >>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >> >>> > <html xmlns="http://www.w3.org/1999/xhtml" >> >>> > xmlns:v="urn:schemas-microsoft-com:vml"> >> >>> > <head> >> >>> > <meta http-equiv="content-type" content="text/html; >> >>> > charset=utf-8"/> >> >>> > <title>Memory Leak Test</title> >> >>> > <script src="http://openlayers.org/api/OpenLayers.js"></script> >> >>> > <script type="text/javascript" charset="utf-8" >> >>> > src="http://mapstraction.com/mapstraction-js/mapstraction.js >> "></script> >> >>> > <script type="text/javascript"> >> >>> > var mapstraction; >> >>> > var markersArray; >> >>> > function initialize() { >> >>> > >> >>> > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); >> >>> > var myPoint = new LatLonPoint(37.404196,-122.008194); >> >>> > mapstraction.setCenterAndZoom(myPoint, 4); >> >>> > mapstraction.addControls({ >> >>> > pan: true, >> >>> > zoom: ''small'', >> >>> > map_type: true >> >>> > }); >> >>> > my_marker = new Marker(myPoint); >> >>> > >> >>> > markersArray = new Array(); >> >>> > my_marker.setIcon(''http://mapstraction.com/icon.gif''<http://mapstraction.com/icon.gif%27> >> ); >> >>> > >> >>> > mapstraction.addMarker( new Marker( new >> >>> > LatLonPoint(37.75,-122.44))); >> >>> > mapstraction.addMarker( new Marker( new >> LatLonPoint(37.65,-122.44))); >> >>> > // add a label to the marker >> >>> > my_marker.setLabel("<blink>Hello!</blink>"); >> >>> > var text = "<b>Be Happy!</b>"; >> >>> > >> >>> > // add info bubble to the marker >> >>> > my_marker.setInfoBubble(text); >> >>> > >> >>> > // display marker >> >>> > mapstraction.addMarker(my_marker); >> >>> > var foo = function() { mapstraction.removeMarker(my_marker); >> }; >> >>> > >> >>> > } >> >>> > >> >>> > function addMarkers() >> >>> > { >> >>> > lat = 37.85; >> >>> > lon = -122.44; >> >>> > >> >>> > mapstraction.removeAllMarkers() >> >>> > for(i=0;i<1000;++i) >> >>> > { >> >>> > var latLon = new LatLonPoint(lat,lon); >> >>> > var markerM = new Marker( latLon); >> >>> > mapstraction.addMarker( markerM, true); >> >>> > markerM = null; >> >>> > latLon = null; >> >>> > lat = lat + 0.01; >> >>> > lon = lon + 0.01; >> >>> > } >> >>> > } >> >>> > setInterval(addMarkers, 3000); >> >>> > </script> >> >>> > </head> >> >>> > <body onload="initialize()" style="font-family: Arial;border: 0 >> >>> > none;"> >> >>> > <H2>Map test</H2> >> >>> > <div id="map_canvas" style="width: 100%; height: 400px"></div> >> >>> > </body> >> >>> > </html> >> >>> > >> >>> > _______________________________________________ >> >>> > Mapstraction mailing list >> >>> > Mapstraction at lists.mapstraction.com >> >>> > >> >>> > >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >>> > >> >>> > >> >>> >> >>> >> >>> >> >>> -- >> >>> Andrew Turner >> >>> mobile: 248.982.3609 >> >>> andrew at fortiusone.com >> >>> http://highearthorbit.com >> >>> >> >>> http://geocommons.com Helping build the Geospatial Web >> >>> Introduction to Neogeography - >> http://oreilly.com/catalog/neogeography >> >> >> >> >> >> _______________________________________________ >> >> Mapstraction mailing list >> >> Mapstraction at lists.mapstraction.com >> >> >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >> >> > >> > >> > _______________________________________________ >> > Mapstraction mailing list >> > Mapstraction at lists.mapstraction.com >> > >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> > >> > >> >> >> >> -- >> Andrew Turner >> mobile: 248.982.3609 >> andrew at fortiusone.com >> http://highearthorbit.com >> >> http://geocommons.com Helping build the Geospatial Web >> Introduction to Neogeography - http://oreilly.com/catalog/neogeography >> > > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Derek Fowler m. +44 (0) 7966 512 369 e. dezfowler at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090903/05693fe4/attachment-0001.htm>
Good thought, I''m going to see if I can reproduce this just using OpenLayers, I''ll let you know how I get on. Craig On Thu, Sep 3, 2009 at 6:21 PM, Derek Fowler <dezfowler at gmail.com> wrote:> Just out of interest - have you tried running that code directly on the > OpenLayers API? It''s possible the memory leak isn''t in Mapstraction but if > it is it would be good to get it sorted and make sure it''s not made it into > v2. > > Derek > > 2009/9/3 Craig Spry <craig.spry at gmail.com> > > I think I might do an OpenLayers provider, I''ll see if I can get some time >> to do it over the weekend, if I manage to do it I will contribute it so >> other people can use it. >> Craig >> >> >> On Wed, Sep 2, 2009 at 10:59 PM, Andrew Turner <andrew at highearthorbit.com >> > wrote: >> >>> On Wed, Sep 2, 2009 at 3:28 AM, Ed Freyfogle<edf at sloan.mit.edu> wrote: >>> > Hi Craig, >>> > >>> > you are correct v2 doesn''t yet support openstreetmap. One issue here is >>> that >>> > (to my knowledge - please correct me if I''m wrong) there is no OSM >>> > javascript library for embedding maps in pages. In the past we''ve done >>> it by >>> > using the Google javascript and adding OSM as a tile layer. This works, >>> but >>> > has the downside of meaning you need to display a Google logo since >>> you''re >>> > using their code. So it''s a bit confusing to users as to whether they >>> are >>> > getting an OSM or a Google map. >>> >>> In v1 - the "OpenLayers" provider used OSM tiles by default. It should >>> be straight-forward to add OpenLayers provider. >>> >>> Also - as Ed mentions, CloudMade support is already in v2. >>> >>> > >>> > 2 options for you >>> > 1. use Cloudmade, which is OSM data rendered by Cloudmade - see >>> > http://cloudmade.com >>> > 2. help add support for OSM. >>> > >>> > My only other comment, as someone who''s active in OSM, would be that >>> OSM, >>> > due to it''s volunteer nature, doesn''t provide any sort of SLA. A few >>> weeks >>> > ago for example the OSM site was down for 2 days due to maintenance. >>> Whether >>> > or not that''s a problem for you I guess depends on the nature of the >>> service >>> > you''re building. >>> > >>> > good luck and thanks for your help >>> > >>> > >>> > On Wed, Sep 2, 2009 at 06:27, Craig Spry <craig.spry at gmail.com> wrote: >>> >> >>> >> We use http://www.openstreetmap.org/ as our source for maps and >>> looking at >>> >> what you have in v2, it doesn''t look like the open street maps and/or >>> open >>> >> layers has been implemented yet, is this right or have I missed >>> something? >>> >> Regards, >>> >> Craig Spry >>> >> On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner < >>> andrew at highearthorbit.com> >>> >> wrote: >>> >>> >>> >>> Thanks for the report Craig. I know there were some bugs in the >>> first >>> >>> version of Mapstraction. We''re building out Mapstraction v2 - (and >>> >>> it''s being used in production sites) so that would be my first >>> >>> suggestion to try. >>> >>> >>> >>> You can download it from: >>> >>> http://code.google.com/p/mapstraction/ >>> >>> >>> >>> And here is an example: >>> >>> >>> >>> >>> http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html >>> >>> >>> >>> The API itself is the same - you primarily just need to change the >>> >>> include files. >>> >>> >>> >>> Let us know how that goes. >>> >>> >>> >>> Andrew >>> >>> >>> >>> >>> >>> >>> >>> On Tue, Sep 1, 2009 at 9:55 PM, Craig Spry<craig.spry at gmail.com> >>> wrote: >>> >>> > Hello List, >>> >>> > Either I have found a memory leak or I am doing something >>> wrong(most >>> >>> > likely). In our application we have about 1000 markers, these >>> change >>> >>> > on a >>> >>> > regular basis. I haven''t found a way to search the markers to only >>> >>> > change >>> >>> > the markers that have changed state, so every time one marker needs >>> to >>> >>> > be >>> >>> > updated, all the markers get redrawn. Now I have provided a test >>> >>> > case, below, so you can see what I have done wrong. I have tried >>> this >>> >>> > with >>> >>> > Chrome, IE(8.0), FireFox(3.0) and Safari(4.0) and when it is loaded >>> the >>> >>> > browser memory usage keeps growing. >>> >>> > Thanks in advance, >>> >>> > Craig Spry >>> >>> > code below this line >>> >>> > >>> >>> > >>> ------------------------------------------------------------------------------------------------------------------------------------------- >>> >>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >>> >>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >>> >>> > <html xmlns="http://www.w3.org/1999/xhtml" >>> >>> > xmlns:v="urn:schemas-microsoft-com:vml"> >>> >>> > <head> >>> >>> > <meta http-equiv="content-type" content="text/html; >>> >>> > charset=utf-8"/> >>> >>> > <title>Memory Leak Test</title> >>> >>> > <script src="http://openlayers.org/api/OpenLayers.js >>> "></script> >>> >>> > <script type="text/javascript" charset="utf-8" >>> >>> > src="http://mapstraction.com/mapstraction-js/mapstraction.js >>> "></script> >>> >>> > <script type="text/javascript"> >>> >>> > var mapstraction; >>> >>> > var markersArray; >>> >>> > function initialize() { >>> >>> > >>> >>> > mapstraction = new Mapstraction(''map_canvas'',''openlayers''); >>> >>> > var myPoint = new LatLonPoint(37.404196,-122.008194); >>> >>> > mapstraction.setCenterAndZoom(myPoint, 4); >>> >>> > mapstraction.addControls({ >>> >>> > pan: true, >>> >>> > zoom: ''small'', >>> >>> > map_type: true >>> >>> > }); >>> >>> > my_marker = new Marker(myPoint); >>> >>> > >>> >>> > markersArray = new Array(); >>> >>> > my_marker.setIcon(''http://mapstraction.com/icon.gif''<http://mapstraction.com/icon.gif%27> >>> ); >>> >>> > >>> >>> > mapstraction.addMarker( new Marker( new >>> >>> > LatLonPoint(37.75,-122.44))); >>> >>> > mapstraction.addMarker( new Marker( new >>> LatLonPoint(37.65,-122.44))); >>> >>> > // add a label to the marker >>> >>> > my_marker.setLabel("<blink>Hello!</blink>"); >>> >>> > var text = "<b>Be Happy!</b>"; >>> >>> > >>> >>> > // add info bubble to the marker >>> >>> > my_marker.setInfoBubble(text); >>> >>> > >>> >>> > // display marker >>> >>> > mapstraction.addMarker(my_marker); >>> >>> > var foo = function() { >>> mapstraction.removeMarker(my_marker); }; >>> >>> > >>> >>> > } >>> >>> > >>> >>> > function addMarkers() >>> >>> > { >>> >>> > lat = 37.85; >>> >>> > lon = -122.44; >>> >>> > >>> >>> > mapstraction.removeAllMarkers() >>> >>> > for(i=0;i<1000;++i) >>> >>> > { >>> >>> > var latLon = new LatLonPoint(lat,lon); >>> >>> > var markerM = new Marker( latLon); >>> >>> > mapstraction.addMarker( markerM, true); >>> >>> > markerM = null; >>> >>> > latLon = null; >>> >>> > lat = lat + 0.01; >>> >>> > lon = lon + 0.01; >>> >>> > } >>> >>> > } >>> >>> > setInterval(addMarkers, 3000); >>> >>> > </script> >>> >>> > </head> >>> >>> > <body onload="initialize()" style="font-family: Arial;border: 0 >>> >>> > none;"> >>> >>> > <H2>Map test</H2> >>> >>> > <div id="map_canvas" style="width: 100%; height: 400px"></div> >>> >>> > </body> >>> >>> > </html> >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Mapstraction mailing list >>> >>> > Mapstraction at lists.mapstraction.com >>> >>> > >>> >>> > >>> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> >>> > >>> >>> > >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> Andrew Turner >>> >>> mobile: 248.982.3609 >>> >>> andrew at fortiusone.com >>> >>> http://highearthorbit.com >>> >>> >>> >>> http://geocommons.com Helping build the Geospatial Web >>> >>> Introduction to Neogeography - >>> http://oreilly.com/catalog/neogeography >>> >> >>> >> >>> >> _______________________________________________ >>> >> Mapstraction mailing list >>> >> Mapstraction at lists.mapstraction.com >>> >> >>> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> >> >>> > >>> > >>> > _______________________________________________ >>> > Mapstraction mailing list >>> > Mapstraction at lists.mapstraction.com >>> > >>> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >>> > >>> > >>> >>> >>> >>> -- >>> Andrew Turner >>> mobile: 248.982.3609 >>> andrew at fortiusone.com >>> http://highearthorbit.com >>> >>> http://geocommons.com Helping build the Geospatial Web >>> Introduction to Neogeography - http://oreilly.com/catalog/neogeography >>> >> >> >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >> > > > -- > Derek Fowler > m. +44 (0) 7966 512 369 > e. dezfowler at gmail.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090908/795a6f73/attachment.htm>
Craig Spry wrote:> We use http://www.openstreetmap.org/ as our source for maps and looking > at what you have in v2, it doesn''t look like the open street maps and/or > open layers has been implemented yet, is this right or have I missed > something?I need openstreetmap or openlayers. I don''t want to use cloudmade because I need a key even for local files. I need to use an api without key for local files. I don''t use the maps in a web site. I includes webkit in a python program in which I can see maps used for genealogy. Google, Yahoo, Microsoft and Openlayers permit this functionality. I understand in v1 openstreemap confused peoples when we saw the google logo, but it worked. I''m too busy with gramps and don''t know sufficient javascript to help you. For the moment, I use v1 and v2 will be used only if we have OSM maps.> > Regards, > Craig Spry > > On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner > <andrew at highearthorbit.com <mailto:andrew at highearthorbit.com>> wrote: > > Thanks for the report Craig. I know there were some bugs in the first > version of Mapstraction. We''re building out Mapstraction v2 - (and > it''s being used in production sites) so that would be my first > suggestion to try. > > You can download it from: > http://code.google.com/p/mapstraction/ > > And here is an example: > http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html > > The API itself is the same - you primarily just need to change the > include files. > > Let us know how that goes. > > Andrew-- Serge
I have to second Serge. Today I wanted to switch from mapstraction v1 to v2 and noticed that the "openstreetmap via google" provider hasn''t made it into v2. I regret this, because I want to offer google, microsoft and openstreetmap maps in my app and now I have to embed and configure 3 javascript apis instead of 2. It also means more legal difficulties/costs (I don''t know the terms of service of cloudmade, but I suppose it is non-free for commercial purposes). on the other side, the development of mapstraction v1 seems to be ceased. Quick conclusion: any hints how to re-enable the openstreetmap support in the mxn.google.js? Franz 2009/9/10 Serge Noiraud <Serge.Noiraud at free.fr>> Craig Spry wrote: > >> We use http://www.openstreetmap.org/ as our source for maps and looking >> at what you have in v2, it doesn''t look like the open street maps and/or >> open layers has been implemented yet, is this right or have I missed >> something? >> > > I need openstreetmap or openlayers. > I don''t want to use cloudmade because I need a key even for local files. > > I need to use an api without key for local files. > I don''t use the maps in a web site. > I includes webkit in a python program in which I can see maps used for > genealogy. > > Google, Yahoo, Microsoft and Openlayers permit this functionality. > > I understand in v1 openstreemap confused peoples when we saw the google > logo, > but it worked. > > I''m too busy with gramps and don''t know sufficient javascript to help you. > > For the moment, I use v1 and v2 will be used only if we have OSM maps. > > >> Regards, >> Craig Spry >> >> On Wed, Sep 2, 2009 at 12:30 PM, Andrew Turner <andrew at highearthorbit.com<mailto: >> andrew at highearthorbit.com>> wrote: >> >> Thanks for the report Craig. I know there were some bugs in the first >> version of Mapstraction. We''re building out Mapstraction v2 - (and >> it''s being used in production sites) so that would be my first >> suggestion to try. >> >> You can download it from: >> http://code.google.com/p/mapstraction/ >> >> And here is an example: >> >> http://code.google.com/p/mapstraction/source/browse/trunk/examples/index.html >> >> The API itself is the same - you primarily just need to change the >> include files. >> >> Let us know how that goes. >> >> Andrew >> > > -- > Serge > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090929/31d6f13c/attachment.htm>